@Only-api
@Post
@Get
@Delete
@Procedure
Feature: Shunt resource actions
Description: This feature checks the patient resource actions, get, post and delete made on FHIR specific Procedure node. This resource is part of the Major Surgery.
File name: xap.feature
Relative path: api/xap.feature
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:28:22.019 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:22.626 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"810"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:22.626 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6gVznQ3GI14yvTgz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20876/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20876/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:22.626 [print] {
"resourceType": "Procedure",
"id": "20876",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:25.806+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:28:22.626 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:22.628 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"810"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:22.628 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6gVznQ3GI14yvTgz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20876/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20876/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:22.628 [print] {
"resourceType": "Procedure",
"id": "20876",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:25.806+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:28:22.628 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:28:23.234 [print] {
"resourceType": "Procedure",
"id": "20876",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:25.806+02:00",
"source": "#6gVznQ3GI14yvTgz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:28:23.868 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:28:24.484 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:28:27.042+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:28:27.042+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:28:24.485 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:25.117 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"781"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:25.117 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ww5U7S52htkRVs8F"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20877/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20877/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:25.117 [print] {
"resourceType": "Procedure",
"id": "20877",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:28.287+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:28:25.117 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:25.118 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"781"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:25.118 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ww5U7S52htkRVs8F"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20877/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20877/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:25.118 [print] {
"resourceType": "Procedure",
"id": "20877",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:28.287+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:28:25.118 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:28:25.752 [print] {
"resourceType": "Procedure",
"id": "20877",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:28.287+02:00",
"source": "#ww5U7S52htkRVs8F",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:28:26.396 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 13ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 13ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:28:27.003 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:28:29.559+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:28:29.559+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:28:27.005 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:27.631 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"653"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:27.631 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kaZt9zMmKq81wvyX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20878/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20878/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:27.631 [print] {
"resourceType": "Procedure",
"id": "20878",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:30.809+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
}
}
> *
print COOKIES
11:28:27.631 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:27.632 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"653"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:27.633 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kaZt9zMmKq81wvyX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20878/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20878/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:27.633 [print] {
"resourceType": "Procedure",
"id": "20878",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:30.809+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
}
}
> *
print COOKIES
11:28:27.633 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:28:28.227 [print] {
"resourceType": "Procedure",
"id": "20878",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:30.809+02:00",
"source": "#kaZt9zMmKq81wvyX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
}
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:28:28.837 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:28:29.448 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:28:32.016+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:28:32.016+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:28:29.449 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:30.052 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"812"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:30.052 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XMmtpUZMXksAYVct"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20879/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20879/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:30.052 [print] {
"resourceType": "Procedure",
"id": "20879",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:33.230+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:28:30.052 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:30.053 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"812"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:30.054 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XMmtpUZMXksAYVct"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20879/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20879/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:30.054 [print] {
"resourceType": "Procedure",
"id": "20879",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:33.230+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:28:30.054 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:28:30.676 [print] {
"resourceType": "Procedure",
"id": "20879",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:33.230+02:00",
"source": "#XMmtpUZMXksAYVct",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:28:31.564 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:28:32.210 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:28:34.723+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:28:34.723+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:28:32.211 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:32.826 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"543"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:32.826 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3Fk83vHLG8brqprG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20880/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20880/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:32.826 [print] {
"resourceType": "Procedure",
"id": "20880",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:36.003+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:28:32.827 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:32.828 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"543"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:32.828 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3Fk83vHLG8brqprG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20880/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20880/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:32.828 [print] {
"resourceType": "Procedure",
"id": "20880",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:36.003+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:28:32.828 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:28:33.421 [print] {
"resourceType": "Procedure",
"id": "20880",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:36.003+02:00",
"source": "#3Fk83vHLG8brqprG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:28:34.092 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:28:34.727 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:28:37.258+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:28:37.258+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:28:34.728 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:35.358 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"770"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:35.358 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sCUeb9kLW9rGhFfq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20881/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20881/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:35.358 [print] {
"resourceType": "Procedure",
"id": "20881",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:38.527+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:28:35.358 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:35.359 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"770"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:35.359 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sCUeb9kLW9rGhFfq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20881/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20881/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:35.359 [print] {
"resourceType": "Procedure",
"id": "20881",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:38.527+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:28:35.359 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:28:35.974 [print] {
"resourceType": "Procedure",
"id": "20881",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:38.527+02:00",
"source": "#sCUeb9kLW9rGhFfq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:28:36.591 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:28:37.236 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:28:39.766+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:28:39.766+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:28:37.237 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:37.848 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"415"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:37.848 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7kLT2psOITzkW2Q1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20882/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20882/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:37.848 [print] {
"resourceType": "Procedure",
"id": "20882",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:41.026+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
}
}
> *
print COOKIES
11:28:37.848 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:37.850 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"415"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:37.850 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7kLT2psOITzkW2Q1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20882/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20882/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:37.850 [print] {
"resourceType": "Procedure",
"id": "20882",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:41.026+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
}
}
> *
print COOKIES
11:28:37.850 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:28:38.543 [print] {
"resourceType": "Procedure",
"id": "20882",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:41.026+02:00",
"source": "#7kLT2psOITzkW2Q1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
}
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:28:39.162 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:28:40.106 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:28:42.336+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:28:42.336+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:28:40.107 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:40.771 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"775"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:40.771 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CkENecCLhupPb8YN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20883/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20883/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:40.771 [print] {
"resourceType": "Procedure",
"id": "20883",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:43.948+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:28:40.771 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:40.773 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"775"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:40.773 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CkENecCLhupPb8YN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20883/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20883/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:40.773 [print] {
"resourceType": "Procedure",
"id": "20883",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:43.948+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:28:40.773 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:28:41.430 [print] {
"resourceType": "Procedure",
"id": "20883",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:43.948+02:00",
"source": "#CkENecCLhupPb8YN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:28:42.048 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:28:42.644 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:28:45.227+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:28:45.227+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:28:42.646 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:43.278 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"783"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:43.278 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HAFp3yMjcrpoxxhU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20884/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20884/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:43.278 [print] {
"resourceType": "Procedure",
"id": "20884",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:46.453+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:28:43.278 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:43.280 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"783"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:43.280 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HAFp3yMjcrpoxxhU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20884/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20884/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:43.280 [print] {
"resourceType": "Procedure",
"id": "20884",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:46.453+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:28:43.280 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:28:43.893 [print] {
"resourceType": "Procedure",
"id": "20884",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:46.453+02:00",
"source": "#HAFp3yMjcrpoxxhU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:28:44.535 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:28:45.153 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:28:47.712+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:28:47.712+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:28:45.155 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:45.818 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:45.818 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dk3WIVv3H2oPCzvT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20885/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20885/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:45.818 [print] {
"resourceType": "Procedure",
"id": "20885",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:48.998+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
}
}
> *
print COOKIES
11:28:45.818 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:45.819 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:45.819 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dk3WIVv3H2oPCzvT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20885/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20885/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:45.820 [print] {
"resourceType": "Procedure",
"id": "20885",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:48.998+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
}
}
> *
print COOKIES
11:28:45.820 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:28:46.444 [print] {
"resourceType": "Procedure",
"id": "20885",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:48.998+02:00",
"source": "#dk3WIVv3H2oPCzvT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
}
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:28:47.047 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:28:47.715 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:28:50.227+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:28:50.227+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:28:47.716 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:48.357 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"777"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:48.357 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"F2TLP8ChTXwYWHUN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20886/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20886/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:48.357 [print] {
"resourceType": "Procedure",
"id": "20886",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:51.530+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:28:48.357 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:48.359 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"777"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:48.359 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"F2TLP8ChTXwYWHUN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20886/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20886/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:48.359 [print] {
"resourceType": "Procedure",
"id": "20886",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:51.530+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:28:48.359 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:28:48.949 [print] {
"resourceType": "Procedure",
"id": "20886",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:51.530+02:00",
"source": "#F2TLP8ChTXwYWHUN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:28:49.563 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 12ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 12ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:28:50.192 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:28:52.735+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:28:52.735+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:28:50.194 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:50.791 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"772"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:50.791 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"r8L3f6Q75wRFJ8ML"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20887/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20887/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:50.791 [print] {
"resourceType": "Procedure",
"id": "20887",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:53.964+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:28:50.791 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:50.793 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"772"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:50.793 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"r8L3f6Q75wRFJ8ML"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20887/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20887/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:50.793 [print] {
"resourceType": "Procedure",
"id": "20887",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:53.964+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:28:50.793 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:28:51.426 [print] {
"resourceType": "Procedure",
"id": "20887",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:53.964+02:00",
"source": "#r8L3f6Q75wRFJ8ML",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:28:52.044 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:28:52.668 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:28:55.219+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:28:55.219+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:28:52.669 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:53.280 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"813"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:53.280 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ed50npKGUe6Nj7Aw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20888/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20888/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:53.280 [print] {
"resourceType": "Procedure",
"id": "20888",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:56.458+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:28:53.280 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:53.281 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"813"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:53.282 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ed50npKGUe6Nj7Aw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20888/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20888/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:53.282 [print] {
"resourceType": "Procedure",
"id": "20888",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:56.458+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:28:53.282 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:28:53.891 [print] {
"resourceType": "Procedure",
"id": "20888",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:56.458+02:00",
"source": "#ed50npKGUe6Nj7Aw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:28:54.531 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:28:55.153 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:28:57.709+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:28:57.709+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:28:55.154 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:56.091 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"813"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:56.091 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LlQM7i6q3S4sNrpF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20889/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20889/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:56.091 [print] {
"resourceType": "Procedure",
"id": "20889",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:59.258+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:28:56.091 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:56.093 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"813"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:56.093 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LlQM7i6q3S4sNrpF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20889/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:28:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20889/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:28:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:56.093 [print] {
"resourceType": "Procedure",
"id": "20889",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:59.258+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:28:56.093 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:28:56.707 [print] {
"resourceType": "Procedure",
"id": "20889",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:28:59.258+02:00",
"source": "#LlQM7i6q3S4sNrpF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:28:57.320 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:28:58.022 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:29:00.489+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:29:00.489+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:28:58.023 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:58.650 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"811"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:58.650 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"A5ne5WDh0imJjIyY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20890/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20890/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:58.650 [print] {
"resourceType": "Procedure",
"id": "20890",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:01.808+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:28:58.650 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:28:58.652 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"811"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:28:58.652 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"A5ne5WDh0imJjIyY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20890/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20890/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:28:58.652 [print] {
"resourceType": "Procedure",
"id": "20890",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:01.808+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:28:58.652 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:28:59.271 [print] {
"resourceType": "Procedure",
"id": "20890",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:01.808+02:00",
"source": "#A5ne5WDh0imJjIyY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:28:59.902 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:29:00.514 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:29:03.077+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:29:03.077+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:29:00.516 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:01.235 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"774"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:01.235 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"snSdyF06qOTuPQPK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20891/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20891/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:01.235 [print] {
"resourceType": "Procedure",
"id": "20891",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:04.402+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:29:01.235 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:01.237 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"774"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:01.237 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"snSdyF06qOTuPQPK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20891/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20891/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:01.237 [print] {
"resourceType": "Procedure",
"id": "20891",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:04.402+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:29:01.237 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:29:01.829 [print] {
"resourceType": "Procedure",
"id": "20891",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:04.402+02:00",
"source": "#snSdyF06qOTuPQPK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:29:02.451 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:29:03.060 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:29:05.627+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:29:05.627+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:29:03.062 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:03.665 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"780"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:03.665 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iPmrIWBT2Uh1BDcq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20892/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20892/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:03.665 [print] {
"resourceType": "Procedure",
"id": "20892",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:06.843+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:29:03.665 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:03.667 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"780"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:03.667 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iPmrIWBT2Uh1BDcq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20892/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20892/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:03.667 [print] {
"resourceType": "Procedure",
"id": "20892",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:06.843+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:29:03.667 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:29:04.304 [print] {
"resourceType": "Procedure",
"id": "20892",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:06.843+02:00",
"source": "#iPmrIWBT2Uh1BDcq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:29:04.905 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:29:05.519 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:29:08.081+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:29:08.081+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:29:05.521 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:06.416 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"813"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:06.416 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OXJtwNZ3Mn1TpynJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20893/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20893/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:06.416 [print] {
"resourceType": "Procedure",
"id": "20893",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:09.593+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:29:06.416 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:06.418 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"813"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:06.418 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OXJtwNZ3Mn1TpynJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20893/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20893/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:06.418 [print] {
"resourceType": "Procedure",
"id": "20893",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:09.593+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:29:06.418 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:29:07.017 [print] {
"resourceType": "Procedure",
"id": "20893",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:09.593+02:00",
"source": "#OXJtwNZ3Mn1TpynJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:29:07.631 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:29:08.252 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:29:10.807+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:29:10.807+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:29:08.254 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:08.897 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"818"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:08.897 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AckZSfcOjjkSwrb0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20894/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20894/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:08.897 [print] {
"resourceType": "Procedure",
"id": "20894",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:12.059+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:29:08.897 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:08.899 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"818"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:08.899 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AckZSfcOjjkSwrb0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20894/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20894/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:08.899 [print] {
"resourceType": "Procedure",
"id": "20894",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:12.059+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:29:08.899 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:29:09.509 [print] {
"resourceType": "Procedure",
"id": "20894",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:12.059+02:00",
"source": "#AckZSfcOjjkSwrb0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:29:10.132 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:29:10.761 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:29:13.297+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:29:13.297+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:29:10.762 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:11.377 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"768"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:11.377 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9Qbv8InYg0bO1Xqp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20895/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20895/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:11.377 [print] {
"resourceType": "Procedure",
"id": "20895",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:14.553+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:29:11.377 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:11.378 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"768"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:11.378 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9Qbv8InYg0bO1Xqp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20895/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20895/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:11.378 [print] {
"resourceType": "Procedure",
"id": "20895",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:14.553+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:29:11.378 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:29:12.000 [print] {
"resourceType": "Procedure",
"id": "20895",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:14.553+02:00",
"source": "#9Qbv8InYg0bO1Xqp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:29:12.623 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:29:13.221 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:29:15.795+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:29:15.795+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:29:13.221 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:13.840 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"662"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:13.840 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6d2leujcrZ8dOfgM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20896/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20896/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:13.840 [print] {
"resourceType": "Procedure",
"id": "20896",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:17.010+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
}
}
> *
print COOKIES
11:29:13.840 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:13.841 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"662"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:13.841 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6d2leujcrZ8dOfgM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20896/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20896/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:13.841 [print] {
"resourceType": "Procedure",
"id": "20896",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:17.010+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
}
}
> *
print COOKIES
11:29:13.841 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:29:14.442 [print] {
"resourceType": "Procedure",
"id": "20896",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:17.010+02:00",
"source": "#6d2leujcrZ8dOfgM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
}
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:29:15.103 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 16ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 16ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:29:15.705 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:29:18.227+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:29:18.227+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:29:15.707 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:16.458 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"769"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:16.458 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"owL4NTIbDXpOFWN0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20897/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20897/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:16.458 [print] {
"resourceType": "Procedure",
"id": "20897",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:19.633+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:29:16.458 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:16.459 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"769"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:16.459 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"owL4NTIbDXpOFWN0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20897/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20897/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:16.459 [print] {
"resourceType": "Procedure",
"id": "20897",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:19.633+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:29:16.459 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:29:17.067 [print] {
"resourceType": "Procedure",
"id": "20897",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:19.633+02:00",
"source": "#owL4NTIbDXpOFWN0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:29:17.689 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:29:18.310 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:29:20.869+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:29:20.869+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:29:18.311 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:18.921 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"779"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:18.921 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uYGNG89WFwL7YQop"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20898/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20898/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:18.921 [print] {
"resourceType": "Procedure",
"id": "20898",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:22.098+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:29:18.921 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:18.922 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"779"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:18.922 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uYGNG89WFwL7YQop"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20898/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20898/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:18.922 [print] {
"resourceType": "Procedure",
"id": "20898",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:22.098+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:29:18.922 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:29:19.523 [print] {
"resourceType": "Procedure",
"id": "20898",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:22.098+02:00",
"source": "#uYGNG89WFwL7YQop",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:29:20.357 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:29:21.013 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:29:23.518+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:29:23.518+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:29:21.014 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:21.622 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"774"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:21.622 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VyHICqteSpeSAttc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20899/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20899/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:21.622 [print] {
"resourceType": "Procedure",
"id": "20899",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:24.798+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:29:21.622 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:21.624 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"774"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:21.624 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VyHICqteSpeSAttc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20899/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20899/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:21.624 [print] {
"resourceType": "Procedure",
"id": "20899",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:24.798+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:29:21.624 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:29:22.223 [print] {
"resourceType": "Procedure",
"id": "20899",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:24.798+02:00",
"source": "#VyHICqteSpeSAttc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:29:22.843 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:29:23.447 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:29:26.020+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:29:26.020+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:29:23.448 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:24.063 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"658"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:24.063 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"U5K4tBITVDICsxWQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20900/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20900/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:24.063 [print] {
"resourceType": "Procedure",
"id": "20900",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:27.227+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
}
}
> *
print COOKIES
11:29:24.063 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:24.065 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"658"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:24.065 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"U5K4tBITVDICsxWQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20900/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20900/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:24.065 [print] {
"resourceType": "Procedure",
"id": "20900",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:27.227+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
}
}
> *
print COOKIES
11:29:24.065 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:29:24.683 [print] {
"resourceType": "Procedure",
"id": "20900",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:27.227+02:00",
"source": "#U5K4tBITVDICsxWQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
}
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:29:25.317 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:29:25.952 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:29:28.487+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:29:28.487+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:29:25.953 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:26.572 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"806"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:26.572 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ej8wxbvfrAeduJL0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20901/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20901/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:26.572 [print] {
"resourceType": "Procedure",
"id": "20901",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:29.749+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:29:26.572 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:26.574 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"806"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:26.574 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ej8wxbvfrAeduJL0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20901/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20901/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:26.574 [print] {
"resourceType": "Procedure",
"id": "20901",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:29.749+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:29:26.574 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:29:27.485 [print] {
"resourceType": "Procedure",
"id": "20901",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:29.749+02:00",
"source": "#ej8wxbvfrAeduJL0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:29:28.094 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:29:28.701 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:29:31.271+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:29:31.271+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:29:28.703 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:29.325 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"800"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:29.325 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jFlMobDFQH5ajQXM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20902/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20902/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:29.325 [print] {
"resourceType": "Procedure",
"id": "20902",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:32.494+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:29:29.325 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:29.327 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"800"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:29.327 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jFlMobDFQH5ajQXM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20902/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20902/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:29.327 [print] {
"resourceType": "Procedure",
"id": "20902",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:32.494+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:29:29.327 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:29:29.939 [print] {
"resourceType": "Procedure",
"id": "20902",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:32.494+02:00",
"source": "#jFlMobDFQH5ajQXM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:29:30.556 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:29:31.163 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:29:33.736+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:29:33.736+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:29:31.164 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:31.800 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"772"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:31.800 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kjgw5TSGHguylt0m"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20903/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20903/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:31.800 [print] {
"resourceType": "Procedure",
"id": "20903",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:34.974+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:29:31.800 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:31.802 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"772"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:31.802 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kjgw5TSGHguylt0m"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20903/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20903/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:31.802 [print] {
"resourceType": "Procedure",
"id": "20903",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:34.974+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:29:31.802 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:29:32.425 [print] {
"resourceType": "Procedure",
"id": "20903",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:34.974+02:00",
"source": "#kjgw5TSGHguylt0m",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:29:33.032 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:29:33.647 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:29:36.210+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:29:36.210+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:29:33.648 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:34.517 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"822"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:34.517 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OUAPrVd7FoF6rbFp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20904/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20904/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:34.517 [print] {
"resourceType": "Procedure",
"id": "20904",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:37.675+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:29:34.517 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:34.519 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"822"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:34.519 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OUAPrVd7FoF6rbFp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20904/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20904/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:34.519 [print] {
"resourceType": "Procedure",
"id": "20904",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:37.675+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:29:34.519 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:29:35.121 [print] {
"resourceType": "Procedure",
"id": "20904",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:37.675+02:00",
"source": "#OUAPrVd7FoF6rbFp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:29:35.778 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:29:36.402 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:29:38.948+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:29:38.948+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:29:36.403 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:37.041 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:37.041 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TRyED4h67t4N6yOj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20905/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20905/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:37.041 [print] {
"resourceType": "Procedure",
"id": "20905",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:40.213+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
}
}
> *
print COOKIES
11:29:37.041 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:37.043 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:37.043 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TRyED4h67t4N6yOj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20905/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20905/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:37.043 [print] {
"resourceType": "Procedure",
"id": "20905",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:40.213+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
}
}
> *
print COOKIES
11:29:37.043 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:29:37.653 [print] {
"resourceType": "Procedure",
"id": "20905",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:40.213+02:00",
"source": "#TRyED4h67t4N6yOj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
}
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:29:38.277 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:29:38.883 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:29:41.455+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:29:41.455+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:29:38.884 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:39.561 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"816"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:39.561 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1MScUJVOq68ijpjT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20906/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20906/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:39.561 [print] {
"resourceType": "Procedure",
"id": "20906",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:42.728+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:29:39.561 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:39.563 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"816"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:39.563 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1MScUJVOq68ijpjT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20906/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20906/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:39.563 [print] {
"resourceType": "Procedure",
"id": "20906",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:42.728+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:29:39.563 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:29:40.177 [print] {
"resourceType": "Procedure",
"id": "20906",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:42.728+02:00",
"source": "#1MScUJVOq68ijpjT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:29:40.833 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:29:41.468 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:29:44.009+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:29:44.009+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:29:41.470 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:42.070 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"761"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:42.070 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ikp9ZmI211lbioOv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20907/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20907/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:42.070 [print] {
"resourceType": "Procedure",
"id": "20907",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:45.243+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:29:42.070 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:42.072 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"761"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:42.072 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ikp9ZmI211lbioOv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20907/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20907/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:42.072 [print] {
"resourceType": "Procedure",
"id": "20907",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:45.243+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:29:42.072 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:29:42.683 [print] {
"resourceType": "Procedure",
"id": "20907",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:45.243+02:00",
"source": "#ikp9ZmI211lbioOv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:29:43.310 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:29:43.922 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:29:46.482+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:29:46.482+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:29:43.923 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:44.562 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"784"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:44.562 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uOtV16SnN33u7EQZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20908/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20908/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:44.562 [print] {
"resourceType": "Procedure",
"id": "20908",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:47.706+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:29:44.562 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:44.563 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"784"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:44.563 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uOtV16SnN33u7EQZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20908/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20908/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:44.563 [print] {
"resourceType": "Procedure",
"id": "20908",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:47.706+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:29:44.563 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:29:45.182 [print] {
"resourceType": "Procedure",
"id": "20908",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:47.706+02:00",
"source": "#uOtV16SnN33u7EQZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:29:45.828 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:29:46.447 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:29:49.004+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:29:49.004+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:29:46.450 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:47.056 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"485"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:47.056 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cyIXylh8nmXHLlQl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20909/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20909/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:47.056 [print] {
"resourceType": "Procedure",
"id": "20909",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:50.230+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed"
}
> *
print COOKIES
11:29:47.056 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:47.058 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"485"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:47.058 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cyIXylh8nmXHLlQl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20909/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20909/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:47.058 [print] {
"resourceType": "Procedure",
"id": "20909",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:50.230+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed"
}
> *
print COOKIES
11:29:47.059 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:29:47.672 [print] {
"resourceType": "Procedure",
"id": "20909",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:50.230+02:00",
"source": "#cyIXylh8nmXHLlQl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:29:48.315 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:29:48.928 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:29:51.490+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:29:51.490+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:29:48.929 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:49.559 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"658"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:49.559 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YWhOP2ohO5yJiNox"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20910/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20910/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:49.559 [print] {
"resourceType": "Procedure",
"id": "20910",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:52.730+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
}
}
> *
print COOKIES
11:29:49.559 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:49.561 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"658"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:49.561 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YWhOP2ohO5yJiNox"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20910/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20910/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:49.561 [print] {
"resourceType": "Procedure",
"id": "20910",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:52.730+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
}
}
> *
print COOKIES
11:29:49.561 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:29:50.188 [print] {
"resourceType": "Procedure",
"id": "20910",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:52.730+02:00",
"source": "#YWhOP2ohO5yJiNox",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
}
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:29:50.837 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:29:51.453 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:29:54.003+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:29:54.003+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:29:51.454 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:52.073 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"763"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:52.073 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lYCo8lyHg5qxsm8w"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20911/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20911/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:52.073 [print] {
"resourceType": "Procedure",
"id": "20911",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:55.242+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:29:52.073 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:52.075 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"763"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:52.075 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lYCo8lyHg5qxsm8w"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20911/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20911/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:52.075 [print] {
"resourceType": "Procedure",
"id": "20911",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:55.242+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:29:52.075 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:29:52.680 [print] {
"resourceType": "Procedure",
"id": "20911",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:55.242+02:00",
"source": "#lYCo8lyHg5qxsm8w",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:29:53.287 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:29:53.888 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:29:56.460+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:29:56.460+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:29:53.890 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:54.496 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"806"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:54.497 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xwsDy6kHWppwe2VM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20912/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20912/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:54.497 [print] {
"resourceType": "Procedure",
"id": "20912",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:57.667+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:29:54.497 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:54.498 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"806"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:54.498 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xwsDy6kHWppwe2VM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20912/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:29:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20912/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:29:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:54.498 [print] {
"resourceType": "Procedure",
"id": "20912",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:57.667+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:29:54.498 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:29:55.101 [print] {
"resourceType": "Procedure",
"id": "20912",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:29:57.667+02:00",
"source": "#xwsDy6kHWppwe2VM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:29:55.707 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:29:56.313 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:29:58.877+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:29:58.877+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:29:56.314 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:56.946 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"762"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:56.946 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yar8AYgu1gBzVf2f"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20913/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20913/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:56.946 [print] {
"resourceType": "Procedure",
"id": "20913",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:00.122+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:29:56.946 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:56.948 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"762"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:56.948 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yar8AYgu1gBzVf2f"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20913/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20913/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:56.948 [print] {
"resourceType": "Procedure",
"id": "20913",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:00.122+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:29:56.948 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:29:57.560 [print] {
"resourceType": "Procedure",
"id": "20913",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:00.122+02:00",
"source": "#yar8AYgu1gBzVf2f",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:29:58.180 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 14ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 14ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:29:58.798 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:30:01.352+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:30:01.352+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:29:58.800 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:59.434 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"778"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:59.434 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8t1Fg97EW8OByGLW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20914/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20914/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:59.434 [print] {
"resourceType": "Procedure",
"id": "20914",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:02.592+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:29:59.434 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:29:59.436 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"778"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:29:59.436 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8t1Fg97EW8OByGLW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20914/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20914/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:29:59.436 [print] {
"resourceType": "Procedure",
"id": "20914",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:02.592+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:29:59.436 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:30:00.473 [print] {
"resourceType": "Procedure",
"id": "20914",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:02.592+02:00",
"source": "#8t1Fg97EW8OByGLW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:30:01.137 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:30:01.758 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:30:04.286+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:30:04.286+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:30:01.760 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:02.356 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:02.356 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qWjhFv8fuN7wnNKx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20915/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20915/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:02.356 [print] {
"resourceType": "Procedure",
"id": "20915",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:05.532+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:30:02.356 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:02.357 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"802"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:02.357 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qWjhFv8fuN7wnNKx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20915/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20915/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:02.357 [print] {
"resourceType": "Procedure",
"id": "20915",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:05.532+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:30:02.357 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:30:02.964 [print] {
"resourceType": "Procedure",
"id": "20915",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:05.532+02:00",
"source": "#qWjhFv8fuN7wnNKx",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:30:03.585 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:30:04.208 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:30:06.758+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:30:06.758+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:30:04.209 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:04.845 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"818"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:04.845 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eSvZFjHjmD6bDdym"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20916/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20916/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:04.845 [print] {
"resourceType": "Procedure",
"id": "20916",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:08.017+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:30:04.845 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:04.847 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"818"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:04.847 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eSvZFjHjmD6bDdym"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20916/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20916/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:04.847 [print] {
"resourceType": "Procedure",
"id": "20916",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:08.017+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:30:04.847 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:30:05.483 [print] {
"resourceType": "Procedure",
"id": "20916",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:08.017+02:00",
"source": "#eSvZFjHjmD6bDdym",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:30:06.095 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:30:06.708 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:30:09.272+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:30:09.272+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:30:06.710 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:07.608 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:07.608 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1yX0LJeVU3CfjztB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20917/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20917/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:07.608 [print] {
"resourceType": "Procedure",
"id": "20917",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:10.780+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
}
}
> *
print COOKIES
11:30:07.608 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:07.609 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"640"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:07.609 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1yX0LJeVU3CfjztB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20917/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20917/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:07.609 [print] {
"resourceType": "Procedure",
"id": "20917",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:10.780+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
}
}
> *
print COOKIES
11:30:07.609 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:30:08.208 [print] {
"resourceType": "Procedure",
"id": "20917",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:10.780+02:00",
"source": "#1yX0LJeVU3CfjztB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
}
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:30:08.851 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:30:09.463 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:30:12.017+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:30:12.017+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:30:09.465 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:10.191 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"811"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:10.191 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"shfg26orrb2QJUo8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20918/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20918/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:10.191 [print] {
"resourceType": "Procedure",
"id": "20918",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:13.335+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:30:10.191 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:10.193 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"811"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:10.193 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"shfg26orrb2QJUo8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20918/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20918/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:10.193 [print] {
"resourceType": "Procedure",
"id": "20918",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:13.335+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:30:10.193 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:30:10.818 [print] {
"resourceType": "Procedure",
"id": "20918",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:13.335+02:00",
"source": "#shfg26orrb2QJUo8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:30:11.436 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:30:12.055 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:30:14.610+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:30:14.610+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:30:12.056 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:12.690 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"772"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:12.690 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CmoadnrFWi9GVFVX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20919/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20919/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:12.690 [print] {
"resourceType": "Procedure",
"id": "20919",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:15.852+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:30:12.690 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:12.691 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"772"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:12.691 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CmoadnrFWi9GVFVX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20919/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20919/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:12.691 [print] {
"resourceType": "Procedure",
"id": "20919",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:15.852+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:30:12.691 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:30:13.295 [print] {
"resourceType": "Procedure",
"id": "20919",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:15.852+02:00",
"source": "#CmoadnrFWi9GVFVX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:30:13.922 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:30:14.834 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:30:17.097+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:30:17.097+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:30:14.836 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:15.460 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"772"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:15.460 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pGff4zqLIVp8nmSt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20920/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20920/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:15.460 [print] {
"resourceType": "Procedure",
"id": "20920",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:18.630+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:30:15.460 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:15.462 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"772"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:15.462 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pGff4zqLIVp8nmSt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20920/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20920/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:15.462 [print] {
"resourceType": "Procedure",
"id": "20920",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:18.630+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:30:15.462 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:30:16.061 [print] {
"resourceType": "Procedure",
"id": "20920",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:18.630+02:00",
"source": "#pGff4zqLIVp8nmSt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:30:16.666 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:30:17.278 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:30:19.843+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:30:19.843+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:30:17.280 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:17.890 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"806"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:17.890 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Qt8yKELc2F5Wpjf0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20921/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20921/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:17.890 [print] {
"resourceType": "Procedure",
"id": "20921",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:21.060+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:30:17.890 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:17.891 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"806"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:17.891 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Qt8yKELc2F5Wpjf0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20921/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20921/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:17.892 [print] {
"resourceType": "Procedure",
"id": "20921",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:21.060+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:30:17.892 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:30:18.718 [print] {
"resourceType": "Procedure",
"id": "20921",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:21.060+02:00",
"source": "#Qt8yKELc2F5Wpjf0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:30:19.362 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:30:20.208 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:30:22.526+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:30:22.526+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:30:20.209 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:20.927 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"805"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:20.927 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EOe2IXEQhVvqwFie"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20922/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20922/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:20.927 [print] {
"resourceType": "Procedure",
"id": "20922",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:24.098+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:30:20.927 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:20.929 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"805"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:20.929 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EOe2IXEQhVvqwFie"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20922/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20922/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:20.929 [print] {
"resourceType": "Procedure",
"id": "20922",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:24.098+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:30:20.929 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:30:21.543 [print] {
"resourceType": "Procedure",
"id": "20922",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:24.098+02:00",
"source": "#EOe2IXEQhVvqwFie",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:30:22.157 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:30:22.766 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:30:25.334+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:30:25.334+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:30:22.767 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:23.409 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"776"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:23.409 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OfiAskL94qqC775I"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20923/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20923/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:23.409 [print] {
"resourceType": "Procedure",
"id": "20923",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:26.559+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:30:23.409 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:23.411 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"776"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:23.411 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OfiAskL94qqC775I"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20923/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20923/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:23.411 [print] {
"resourceType": "Procedure",
"id": "20923",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:26.559+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:30:23.411 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:30:24.009 [print] {
"resourceType": "Procedure",
"id": "20923",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:26.559+02:00",
"source": "#OfiAskL94qqC775I",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:30:24.617 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:30:25.223 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:30:27.791+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:30:27.791+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:30:25.224 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:26.851 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"780"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:26.851 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9RjSiw38kWLWQgZk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20924/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20924/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:26.851 [print] {
"resourceType": "Procedure",
"id": "20924",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:30.026+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:30:26.851 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:26.852 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"780"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:26.852 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9RjSiw38kWLWQgZk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20924/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20924/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:26.852 [print] {
"resourceType": "Procedure",
"id": "20924",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:30.026+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:30:26.852 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:30:28.460 [print] {
"resourceType": "Procedure",
"id": "20924",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:30.026+02:00",
"source": "#9RjSiw38kWLWQgZk",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:30:29.094 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:30:29.702 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:30:32.274+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:30:32.274+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:30:29.704 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:30.331 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"775"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:30.331 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hJZjDP0o4eH4YOIj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20925/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20925/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:30.331 [print] {
"resourceType": "Procedure",
"id": "20925",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:33.488+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:30:30.331 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:30.333 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"775"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:30.333 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hJZjDP0o4eH4YOIj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20925/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20925/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:30.333 [print] {
"resourceType": "Procedure",
"id": "20925",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:33.488+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:30:30.333 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:30:30.963 [print] {
"resourceType": "Procedure",
"id": "20925",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:33.488+02:00",
"source": "#hJZjDP0o4eH4YOIj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:30:31.583 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:30:32.173 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:30:34.763+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:30:34.763+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:30:32.174 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:32.785 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"775"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:32.785 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gUVOOQYoiJulKxBb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20926/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20926/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:32.785 [print] {
"resourceType": "Procedure",
"id": "20926",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:35.962+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:30:32.785 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:32.787 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"775"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:32.787 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gUVOOQYoiJulKxBb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20926/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20926/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:32.787 [print] {
"resourceType": "Procedure",
"id": "20926",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:35.962+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:30:32.787 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:30:33.407 [print] {
"resourceType": "Procedure",
"id": "20926",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:35.962+02:00",
"source": "#gUVOOQYoiJulKxBb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:30:34.026 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:30:34.631 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:30:37.199+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:30:37.199+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:30:34.633 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:35.241 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"653"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:35.241 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BovrJKlvfKSFVLam"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20927/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20927/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:35.241 [print] {
"resourceType": "Procedure",
"id": "20927",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:38.415+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
}
}
> *
print COOKIES
11:30:35.241 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:35.242 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"653"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:35.242 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BovrJKlvfKSFVLam"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20927/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20927/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:35.242 [print] {
"resourceType": "Procedure",
"id": "20927",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:38.415+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
}
}
> *
print COOKIES
11:30:35.242 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:30:35.964 [print] {
"resourceType": "Procedure",
"id": "20927",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:38.415+02:00",
"source": "#BovrJKlvfKSFVLam",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
}
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:30:36.598 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:30:37.205 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:30:39.776+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:30:39.776+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:30:37.207 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:38.112 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"496"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:38.112 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"va4x5qxNrVzSLc0L"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20928/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20928/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:38.112 [print] {
"resourceType": "Procedure",
"id": "20928",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:41.273+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed"
}
> *
print COOKIES
11:30:38.112 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:38.114 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"496"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:38.114 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"va4x5qxNrVzSLc0L"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20928/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20928/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:38.114 [print] {
"resourceType": "Procedure",
"id": "20928",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:41.273+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed"
}
> *
print COOKIES
11:30:38.114 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:30:38.719 [print] {
"resourceType": "Procedure",
"id": "20928",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:41.273+02:00",
"source": "#va4x5qxNrVzSLc0L",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:30:39.629 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:30:40.292 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:30:42.792+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:30:42.792+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:30:40.293 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:40.962 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:40.962 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lB4tjL5PSeR6YyZI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20929/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20929/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:40.962 [print] {
"resourceType": "Procedure",
"id": "20929",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:44.121+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
}
}
> *
print COOKIES
11:30:40.962 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:40.963 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:40.964 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lB4tjL5PSeR6YyZI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20929/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20929/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:40.964 [print] {
"resourceType": "Procedure",
"id": "20929",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:44.121+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
}
}
> *
print COOKIES
11:30:40.964 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:30:42.570 [print] {
"resourceType": "Procedure",
"id": "20929",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:44.121+02:00",
"source": "#lB4tjL5PSeR6YyZI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
}
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:30:43.181 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:30:43.810 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:30:46.361+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:30:46.361+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:30:43.814 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:44.487 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"780"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:44.487 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Hw7psswTPN7S4C6g"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20930/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20930/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:44.487 [print] {
"resourceType": "Procedure",
"id": "20930",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:47.651+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:30:44.488 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:44.490 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"780"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:44.490 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Hw7psswTPN7S4C6g"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20930/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20930/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:44.490 [print] {
"resourceType": "Procedure",
"id": "20930",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:47.651+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:30:44.490 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:30:45.312 [print] {
"resourceType": "Procedure",
"id": "20930",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:47.651+02:00",
"source": "#Hw7psswTPN7S4C6g",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:30:45.951 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:30:46.604 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:30:49.112+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:30:49.112+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:30:46.606 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:47.246 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"774"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:47.246 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Acrs1fTOzS4Zs0Re"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20931/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20931/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:47.246 [print] {
"resourceType": "Procedure",
"id": "20931",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:50.422+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:30:47.246 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:47.247 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"774"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:47.247 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Acrs1fTOzS4Zs0Re"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20931/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20931/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:47.248 [print] {
"resourceType": "Procedure",
"id": "20931",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:50.422+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:30:47.248 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:30:48.233 [print] {
"resourceType": "Procedure",
"id": "20931",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:50.422+02:00",
"source": "#Acrs1fTOzS4Zs0Re",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:30:48.858 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:30:49.489 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:30:52.035+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:30:52.035+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:30:49.490 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:50.140 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"658"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:50.140 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tqpk2OqxisFL2gg6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20932/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20932/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:50.140 [print] {
"resourceType": "Procedure",
"id": "20932",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:53.312+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
}
}
> *
print COOKIES
11:30:50.140 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:50.141 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"658"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:50.141 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tqpk2OqxisFL2gg6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20932/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20932/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:50.141 [print] {
"resourceType": "Procedure",
"id": "20932",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:53.312+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
}
}
> *
print COOKIES
11:30:50.141 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:30:50.775 [print] {
"resourceType": "Procedure",
"id": "20932",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:53.312+02:00",
"source": "#tqpk2OqxisFL2gg6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
}
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:30:51.422 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:30:52.024 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:30:54.566+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:30:54.566+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:30:52.026 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:53.847 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"766"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:53.847 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9KJTuwknbkVd2N1L"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20933/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20933/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:53.847 [print] {
"resourceType": "Procedure",
"id": "20933",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:57.017+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:30:53.847 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:53.848 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"766"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:53.849 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9KJTuwknbkVd2N1L"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20933/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:30:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20933/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:30:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:53.849 [print] {
"resourceType": "Procedure",
"id": "20933",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:57.017+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:30:53.849 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:30:54.479 [print] {
"resourceType": "Procedure",
"id": "20933",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:30:57.017+02:00",
"source": "#9KJTuwknbkVd2N1L",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:30:55.118 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:30:55.824 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:30:58.277+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:30:58.277+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:30:55.825 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:57.154 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"777"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:57.154 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ntWdU5z8aVRTJR67"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20934/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:31:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20934/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:31:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:57.154 [print] {
"resourceType": "Procedure",
"id": "20934",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:31:00.329+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:30:57.154 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:57.155 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"777"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:57.155 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ntWdU5z8aVRTJR67"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20934/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:31:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20934/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:31:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:57.156 [print] {
"resourceType": "Procedure",
"id": "20934",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:31:00.329+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:30:57.156 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:30:57.756 [print] {
"resourceType": "Procedure",
"id": "20934",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:31:00.329+02:00",
"source": "#ntWdU5z8aVRTJR67",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:30:58.390 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:30:59.008 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:31:01.566+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:31:01.566+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:30:59.009 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:59.649 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"774"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:59.649 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qB5LhXiaaze0rXt4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20935/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:31:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20935/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:31:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:59.649 [print] {
"resourceType": "Procedure",
"id": "20935",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:31:02.816+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:30:59.649 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:30:59.650 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"774"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:30:59.650 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qB5LhXiaaze0rXt4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20935/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:31:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20935/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:31:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:30:59.651 [print] {
"resourceType": "Procedure",
"id": "20935",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:31:02.816+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:30:59.651 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:31:00.575 [print] {
"resourceType": "Procedure",
"id": "20935",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:31:02.816+02:00",
"source": "#qB5LhXiaaze0rXt4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:31:01.188 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:31:01.830 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:31:04.365+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:31:04.365+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:31:01.832 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:02.459 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"770"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:02.459 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1k2w8rdhs3Lz6Da9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20936/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:31:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20936/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:31:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:02.459 [print] {
"resourceType": "Procedure",
"id": "20936",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:31:05.628+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:31:02.459 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:02.460 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"770"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:02.460 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1k2w8rdhs3Lz6Da9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20936/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:31:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20936/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:31:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:02.461 [print] {
"resourceType": "Procedure",
"id": "20936",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:31:05.628+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:31:02.461 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:31:03.071 [print] {
"resourceType": "Procedure",
"id": "20936",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:31:05.628+02:00",
"source": "#1k2w8rdhs3Lz6Da9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:31:03.665 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:31:04.273 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:31:06.844+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:31:06.844+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:31:04.273 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:04.912 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"766"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:04.912 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZGn6KQOeoQFsc61N"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20937/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:31:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20937/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:31:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:04.912 [print] {
"resourceType": "Procedure",
"id": "20937",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:31:08.086+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:31:04.912 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:31:04.913 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"766"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:31:04.913 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZGn6KQOeoQFsc61N"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20937/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:31:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20937/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:31:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:31:04.913 [print] {
"resourceType": "Procedure",
"id": "20937",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:31:08.086+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:31:04.913 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:31:05.542 [print] {
"resourceType": "Procedure",
"id": "20937",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:31:08.086+02:00",
"source": "#ZGn6KQOeoQFsc61N",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:15.308 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:15.902 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:32:18.501+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:32:18.501+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:15.904 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:16.882 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"778"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:16.882 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sgrlMA9jF3h9sOxt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20938/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20938/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:16.882 [print] {
"resourceType": "Procedure",
"id": "20938",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:20.079+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:32:16.882 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:16.883 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"778"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:16.883 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sgrlMA9jF3h9sOxt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20938/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20938/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:16.883 [print] {
"resourceType": "Procedure",
"id": "20938",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:20.079+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:32:16.883 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:17.479 [print] {
"resourceType": "Procedure",
"id": "20938",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:20.079+02:00",
"source": "#sgrlMA9jF3h9sOxt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:18.070 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:18.679 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:32:21.267+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:32:21.267+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:18.680 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:19.312 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"813"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:19.312 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6m1QKD9bNXV0eYeu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20939/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20939/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:19.312 [print] {
"resourceType": "Procedure",
"id": "20939",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:22.503+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:32:19.312 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:19.313 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"813"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:19.313 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6m1QKD9bNXV0eYeu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20939/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20939/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:19.313 [print] {
"resourceType": "Procedure",
"id": "20939",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:22.503+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:32:19.313 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:19.922 [print] {
"resourceType": "Procedure",
"id": "20939",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:22.503+02:00",
"source": "#6m1QKD9bNXV0eYeu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:20.536 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:21.248 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:32:23.732+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:32:23.732+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:21.249 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:21.851 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"818"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:21.851 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"q69jFhRXDoAijIMU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20940/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20940/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:21.851 [print] {
"resourceType": "Procedure",
"id": "20940",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:25.047+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:32:21.851 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:21.852 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"818"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:21.853 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"q69jFhRXDoAijIMU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20940/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20940/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:21.853 [print] {
"resourceType": "Procedure",
"id": "20940",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:25.047+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:32:21.853 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:22.644 [print] {
"resourceType": "Procedure",
"id": "20940",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:25.047+02:00",
"source": "#q69jFhRXDoAijIMU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:23.262 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:23.860 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:32:26.458+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:32:26.458+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:23.862 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:24.457 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"770"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:24.457 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"r2r3jnqZzRfQm4no"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20941/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20941/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:24.457 [print] {
"resourceType": "Procedure",
"id": "20941",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:27.650+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:32:24.457 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:24.459 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"770"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:24.459 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"r2r3jnqZzRfQm4no"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20941/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20941/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:24.459 [print] {
"resourceType": "Procedure",
"id": "20941",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:27.650+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:32:24.459 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:25.109 [print] {
"resourceType": "Procedure",
"id": "20941",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:27.650+02:00",
"source": "#r2r3jnqZzRfQm4no",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:25.734 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 15ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 15ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:26.338 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:32:28.928+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:32:28.928+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:26.339 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:26.934 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"652"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:26.934 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4brRHmukj9wjddsu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20942/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20942/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:26.934 [print] {
"resourceType": "Procedure",
"id": "20942",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:30.127+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
}
}
> *
print COOKIES
11:32:26.934 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:26.936 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"652"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:26.936 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4brRHmukj9wjddsu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20942/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20942/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:26.936 [print] {
"resourceType": "Procedure",
"id": "20942",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:30.127+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
}
}
> *
print COOKIES
11:32:26.936 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:27.533 [print] {
"resourceType": "Procedure",
"id": "20942",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:30.127+02:00",
"source": "#4brRHmukj9wjddsu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
}
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:28.142 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:28.755 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:32:31.335+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:32:31.335+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:28.756 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:29.372 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"804"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:29.372 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"la3dNhJAs5KnvAeU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20943/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20943/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:29.372 [print] {
"resourceType": "Procedure",
"id": "20943",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:32.556+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:32:29.372 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:29.373 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"804"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:29.373 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"la3dNhJAs5KnvAeU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20943/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20943/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:29.373 [print] {
"resourceType": "Procedure",
"id": "20943",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:32.556+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:32:29.373 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:29.969 [print] {
"resourceType": "Procedure",
"id": "20943",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:32.556+02:00",
"source": "#la3dNhJAs5KnvAeU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:30.587 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:31.335 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:32:33.778+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:32:33.778+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:31.336 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:31.938 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"664"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:31.939 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7muu1rW0MZoAFlKo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20944/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20944/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:31.939 [print] {
"resourceType": "Procedure",
"id": "20944",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:35.133+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
}
}
> *
print COOKIES
11:32:31.939 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:31.940 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"664"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:31.940 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7muu1rW0MZoAFlKo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20944/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20944/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:31.940 [print] {
"resourceType": "Procedure",
"id": "20944",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:35.133+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
}
}
> *
print COOKIES
11:32:31.940 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:32.534 [print] {
"resourceType": "Procedure",
"id": "20944",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:35.133+02:00",
"source": "#7muu1rW0MZoAFlKo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
}
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:33.148 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:34.772 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:32:36.338+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:32:36.338+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:34.773 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:35.439 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"811"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:35.439 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LY4fk5CQ5oyyJ9QV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20945/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20945/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:35.439 [print] {
"resourceType": "Procedure",
"id": "20945",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:38.626+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:32:35.439 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:35.441 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"811"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:35.441 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LY4fk5CQ5oyyJ9QV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20945/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20945/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:35.441 [print] {
"resourceType": "Procedure",
"id": "20945",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:38.626+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:32:35.441 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:36.062 [print] {
"resourceType": "Procedure",
"id": "20945",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:38.626+02:00",
"source": "#LY4fk5CQ5oyyJ9QV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:36.687 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:37.296 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:32:39.881+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:32:39.881+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:37.297 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:37.915 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"777"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:37.915 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dk07eme6QHDMk3eo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20946/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20946/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:37.915 [print] {
"resourceType": "Procedure",
"id": "20946",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:41.104+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:32:37.915 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:37.917 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"777"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:37.917 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dk07eme6QHDMk3eo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20946/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20946/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:37.917 [print] {
"resourceType": "Procedure",
"id": "20946",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:41.104+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:32:37.917 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:38.532 [print] {
"resourceType": "Procedure",
"id": "20946",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:41.104+02:00",
"source": "#dk07eme6QHDMk3eo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:39.165 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:39.878 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:32:42.358+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:32:42.358+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:39.879 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:40.495 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"809"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:40.495 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gb9rB92nuWGaDc0q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20947/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20947/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:40.495 [print] {
"resourceType": "Procedure",
"id": "20947",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:43.684+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:32:40.495 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:40.497 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"809"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:40.497 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gb9rB92nuWGaDc0q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20947/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20947/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:40.497 [print] {
"resourceType": "Procedure",
"id": "20947",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:43.684+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:32:40.498 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:41.088 [print] {
"resourceType": "Procedure",
"id": "20947",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:43.684+02:00",
"source": "#gb9rB92nuWGaDc0q",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:41.718 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:42.348 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:32:44.912+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:32:44.912+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:42.349 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:42.958 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"784"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:42.959 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nCaLojUUUTYq9z8f"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20948/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20948/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:42.959 [print] {
"resourceType": "Procedure",
"id": "20948",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:46.136+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:32:42.959 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:42.960 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"784"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:42.960 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nCaLojUUUTYq9z8f"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20948/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20948/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:42.960 [print] {
"resourceType": "Procedure",
"id": "20948",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:46.136+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:32:42.960 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:43.555 [print] {
"resourceType": "Procedure",
"id": "20948",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:46.136+02:00",
"source": "#nCaLojUUUTYq9z8f",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:44.177 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:44.797 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:32:47.369+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:32:47.369+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:44.798 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:45.444 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"772"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:45.445 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"H1ubIF9earjwuMd6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20949/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20949/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:45.445 [print] {
"resourceType": "Procedure",
"id": "20949",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:48.612+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:32:45.445 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:45.446 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"772"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:45.446 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"H1ubIF9earjwuMd6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20949/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20949/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:45.446 [print] {
"resourceType": "Procedure",
"id": "20949",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:48.612+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:32:45.446 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:46.040 [print] {
"resourceType": "Procedure",
"id": "20949",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:48.612+02:00",
"source": "#H1ubIF9earjwuMd6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:46.664 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:47.620 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:32:49.858+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:32:49.858+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:47.621 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:48.239 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"818"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:48.239 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EyAD3QYFJVNQjy0b"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20950/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20950/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:48.239 [print] {
"resourceType": "Procedure",
"id": "20950",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:51.424+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:32:48.239 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:48.241 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"818"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:48.241 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EyAD3QYFJVNQjy0b"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20950/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20950/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:48.241 [print] {
"resourceType": "Procedure",
"id": "20950",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:51.424+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:32:48.241 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:48.834 [print] {
"resourceType": "Procedure",
"id": "20950",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:51.424+02:00",
"source": "#EyAD3QYFJVNQjy0b",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:49.433 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:50.049 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:32:52.628+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:32:52.628+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:50.050 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:50.658 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"775"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:50.658 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yCm5z7KqQtulGSwC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20951/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20951/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:50.658 [print] {
"resourceType": "Procedure",
"id": "20951",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:53.849+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:32:50.659 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:50.660 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"775"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:50.660 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yCm5z7KqQtulGSwC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20951/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20951/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:50.660 [print] {
"resourceType": "Procedure",
"id": "20951",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:53.849+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:32:50.660 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:51.268 [print] {
"resourceType": "Procedure",
"id": "20951",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:53.849+02:00",
"source": "#yCm5z7KqQtulGSwC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:51.917 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:52.506 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:32:55.099+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:32:55.099+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:52.508 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:53.120 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"819"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:53.120 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pRcb8vLjpHPLpK3x"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20952/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20952/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:53.120 [print] {
"resourceType": "Procedure",
"id": "20952",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:56.300+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:32:53.120 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:53.122 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"819"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:53.122 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pRcb8vLjpHPLpK3x"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20952/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20952/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:53.122 [print] {
"resourceType": "Procedure",
"id": "20952",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:56.300+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:32:53.122 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:53.734 [print] {
"resourceType": "Procedure",
"id": "20952",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:56.300+02:00",
"source": "#pRcb8vLjpHPLpK3x",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:54.348 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:55.066 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:32:57.544+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:32:57.544+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:55.067 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:55.690 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"768"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:55.690 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pi7OFDaoqzG6GhP8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20953/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20953/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:55.690 [print] {
"resourceType": "Procedure",
"id": "20953",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:58.883+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:32:55.690 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:55.692 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"768"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:55.692 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pi7OFDaoqzG6GhP8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20953/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:32:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20953/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:32:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:55.692 [print] {
"resourceType": "Procedure",
"id": "20953",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:58.883+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:32:55.692 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:56.340 [print] {
"resourceType": "Procedure",
"id": "20953",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:32:58.883+02:00",
"source": "#pi7OFDaoqzG6GhP8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:56.956 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:57.552 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:33:00.152+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:33:00.152+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:57.553 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:58.162 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"652"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:58.162 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AuBlA7DJf4bPBLvO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20954/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20954/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:58.162 [print] {
"resourceType": "Procedure",
"id": "20954",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:01.344+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
}
}
> *
print COOKIES
11:32:58.162 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:32:58.164 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"652"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:32:58.164 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AuBlA7DJf4bPBLvO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20954/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20954/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:32:58.164 [print] {
"resourceType": "Procedure",
"id": "20954",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:01.344+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
}
}
> *
print COOKIES
11:32:58.164 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:32:58.771 [print] {
"resourceType": "Procedure",
"id": "20954",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:01.344+02:00",
"source": "#AuBlA7DJf4bPBLvO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
}
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:32:59.370 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:32:59.973 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:33:02.562+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:33:02.562+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:32:59.973 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:00.613 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"771"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:00.614 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KkkT9hFDOrWanZQe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20955/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20955/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:00.614 [print] {
"resourceType": "Procedure",
"id": "20955",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:03.778+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:33:00.614 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:00.615 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"771"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:00.615 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KkkT9hFDOrWanZQe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20955/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20955/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:00.615 [print] {
"resourceType": "Procedure",
"id": "20955",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:03.778+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:33:00.615 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:01.237 [print] {
"resourceType": "Procedure",
"id": "20955",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:03.778+02:00",
"source": "#KkkT9hFDOrWanZQe",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:01.854 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:02.447 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:33:05.027+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:33:05.027+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:02.449 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:03.061 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"780"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:03.061 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ofuuzN3YhRuzW21S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20956/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20956/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:03.061 [print] {
"resourceType": "Procedure",
"id": "20956",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:06.256+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:33:03.061 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:03.062 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"780"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:03.062 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ofuuzN3YhRuzW21S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20956/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20956/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:03.062 [print] {
"resourceType": "Procedure",
"id": "20956",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:06.256+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:33:03.062 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:03.675 [print] {
"resourceType": "Procedure",
"id": "20956",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:06.256+02:00",
"source": "#ofuuzN3YhRuzW21S",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:04.319 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:04.941 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:33:07.510+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:33:07.510+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:04.943 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:05.549 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:05.549 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EW1XhAHTRw9d1ty3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20957/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20957/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:05.550 [print] {
"resourceType": "Procedure",
"id": "20957",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:08.746+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
}
}
> *
print COOKIES
11:33:05.550 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:05.551 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:05.551 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EW1XhAHTRw9d1ty3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20957/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20957/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:05.551 [print] {
"resourceType": "Procedure",
"id": "20957",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:08.746+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
}
}
> *
print COOKIES
11:33:05.551 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:06.153 [print] {
"resourceType": "Procedure",
"id": "20957",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:08.746+02:00",
"source": "#EW1XhAHTRw9d1ty3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
}
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:06.981 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:07.587 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:33:10.154+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:33:10.154+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:07.588 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:08.202 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"805"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:08.202 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pCQyTFEH5L8UvCGG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20958/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20958/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:08.202 [print] {
"resourceType": "Procedure",
"id": "20958",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:11.394+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:33:08.202 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:08.203 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"805"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:08.203 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pCQyTFEH5L8UvCGG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20958/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20958/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:08.203 [print] {
"resourceType": "Procedure",
"id": "20958",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:11.394+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:33:08.203 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:09.002 [print] {
"resourceType": "Procedure",
"id": "20958",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:11.394+02:00",
"source": "#pCQyTFEH5L8UvCGG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:09.613 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:10.219 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:33:12.808+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:33:12.808+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:10.220 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:10.836 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"776"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:10.836 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qzKuQRt4t4mc60mo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20959/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20959/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:10.836 [print] {
"resourceType": "Procedure",
"id": "20959",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:14.021+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:33:10.837 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:10.838 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"776"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:10.838 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qzKuQRt4t4mc60mo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20959/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20959/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:10.838 [print] {
"resourceType": "Procedure",
"id": "20959",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:14.021+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:33:10.838 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:11.487 [print] {
"resourceType": "Procedure",
"id": "20959",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:14.021+02:00",
"source": "#qzKuQRt4t4mc60mo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:12.111 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:13.733 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:33:15.296+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:33:15.296+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:13.734 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:14.346 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"781"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:14.346 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AmWqBpaZBeM25EWW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20960/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20960/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:14.346 [print] {
"resourceType": "Procedure",
"id": "20960",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:17.539+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:33:14.346 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:14.347 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"781"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:14.347 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AmWqBpaZBeM25EWW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20960/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20960/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:14.347 [print] {
"resourceType": "Procedure",
"id": "20960",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:17.539+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:33:14.347 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:15.191 [print] {
"resourceType": "Procedure",
"id": "20960",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:17.539+02:00",
"source": "#AmWqBpaZBeM25EWW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:16.076 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:16.957 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:33:19.257+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:33:19.257+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:16.958 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:17.573 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"762"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:17.573 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gXxpfpa4QQoYiXqW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20961/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20961/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:17.573 [print] {
"resourceType": "Procedure",
"id": "20961",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:20.757+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:33:17.573 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:17.575 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"762"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:17.575 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gXxpfpa4QQoYiXqW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20961/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20961/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:17.575 [print] {
"resourceType": "Procedure",
"id": "20961",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:20.757+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:33:17.575 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:18.162 [print] {
"resourceType": "Procedure",
"id": "20961",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:20.757+02:00",
"source": "#gXxpfpa4QQoYiXqW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:18.776 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:19.370 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:33:21.963+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:33:21.963+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:19.371 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:21.082 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"645"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:21.083 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"57iSeq1aaja6Rqlh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20962/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20962/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:21.083 [print] {
"resourceType": "Procedure",
"id": "20962",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:24.273+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
}
}
> *
print COOKIES
11:33:21.083 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:21.084 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"645"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:21.084 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"57iSeq1aaja6Rqlh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20962/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20962/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:21.084 [print] {
"resourceType": "Procedure",
"id": "20962",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:24.273+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
}
}
> *
print COOKIES
11:33:21.084 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:21.689 [print] {
"resourceType": "Procedure",
"id": "20962",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:24.273+02:00",
"source": "#57iSeq1aaja6Rqlh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
}
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:22.281 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:22.882 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:33:25.475+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:33:25.475+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:22.883 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:23.482 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"804"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:23.482 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wyLkzwMSug17w1fR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20963/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20963/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:23.482 [print] {
"resourceType": "Procedure",
"id": "20963",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:26.677+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:33:23.482 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:23.483 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"804"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:23.483 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wyLkzwMSug17w1fR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20963/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20963/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:23.483 [print] {
"resourceType": "Procedure",
"id": "20963",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:26.677+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:33:23.483 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:24.136 [print] {
"resourceType": "Procedure",
"id": "20963",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:26.677+02:00",
"source": "#wyLkzwMSug17w1fR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:25.059 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:25.682 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:33:28.252+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:33:28.252+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:25.683 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:26.299 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"806"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:26.299 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rE7Quzvrm4mDUrg9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20964/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20964/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:26.299 [print] {
"resourceType": "Procedure",
"id": "20964",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:29.488+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:33:26.299 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:26.301 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"806"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:26.301 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rE7Quzvrm4mDUrg9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20964/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20964/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:26.301 [print] {
"resourceType": "Procedure",
"id": "20964",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:29.488+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:33:26.301 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:26.924 [print] {
"resourceType": "Procedure",
"id": "20964",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:29.488+02:00",
"source": "#rE7Quzvrm4mDUrg9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:27.683 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:29.312 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:33:30.862+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:33:30.862+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:29.314 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:29.960 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"800"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:29.960 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YyTEKzxaSrw0sV8w"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20965/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20965/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:29.960 [print] {
"resourceType": "Procedure",
"id": "20965",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:33.133+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:33:29.960 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:29.962 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"800"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:29.962 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YyTEKzxaSrw0sV8w"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20965/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20965/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:29.962 [print] {
"resourceType": "Procedure",
"id": "20965",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:33.133+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:33:29.962 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:30.558 [print] {
"resourceType": "Procedure",
"id": "20965",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:33.133+02:00",
"source": "#YyTEKzxaSrw0sV8w",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:31.191 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:31.798 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:33:34.385+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:33:34.385+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:31.799 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:32.411 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"766"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:32.411 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lNZmSvGdOd1rv0o3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20966/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20966/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:32.411 [print] {
"resourceType": "Procedure",
"id": "20966",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:35.592+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:33:32.411 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:32.412 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"766"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:32.412 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lNZmSvGdOd1rv0o3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20966/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20966/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:32.413 [print] {
"resourceType": "Procedure",
"id": "20966",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:35.592+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:33:32.413 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:33.009 [print] {
"resourceType": "Procedure",
"id": "20966",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:35.592+02:00",
"source": "#lNZmSvGdOd1rv0o3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:33.639 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:34.318 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:33:36.834+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:33:36.834+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:34.319 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:34.955 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"810"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:34.955 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ckw0kOjWnNAX49hA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20967/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20967/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:34.955 [print] {
"resourceType": "Procedure",
"id": "20967",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:38.141+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:33:34.955 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:34.956 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"810"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:34.956 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ckw0kOjWnNAX49hA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20967/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20967/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:34.956 [print] {
"resourceType": "Procedure",
"id": "20967",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:38.141+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:33:34.956 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:35.589 [print] {
"resourceType": "Procedure",
"id": "20967",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:38.141+02:00",
"source": "#ckw0kOjWnNAX49hA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:36.216 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:36.815 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:33:39.401+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:33:39.401+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:36.816 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:37.869 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"662"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:37.869 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lNuaQBzJgxucScUK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20968/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20968/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:37.869 [print] {
"resourceType": "Procedure",
"id": "20968",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:41.062+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
}
}
> *
print COOKIES
11:33:37.869 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:37.870 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"662"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:37.870 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lNuaQBzJgxucScUK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20968/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20968/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:37.870 [print] {
"resourceType": "Procedure",
"id": "20968",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:41.062+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
}
}
> *
print COOKIES
11:33:37.870 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:38.506 [print] {
"resourceType": "Procedure",
"id": "20968",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:41.062+02:00",
"source": "#lNuaQBzJgxucScUK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
}
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:39.209 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:39.838 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:33:42.400+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:33:42.400+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:39.839 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:40.466 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"761"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:40.466 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wZoi4XVeHA72fRJA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20969/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20969/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:40.466 [print] {
"resourceType": "Procedure",
"id": "20969",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:43.647+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:33:40.466 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:40.467 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"761"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:40.467 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wZoi4XVeHA72fRJA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20969/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20969/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:40.467 [print] {
"resourceType": "Procedure",
"id": "20969",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:43.647+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:33:40.467 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:41.073 [print] {
"resourceType": "Procedure",
"id": "20969",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:43.647+02:00",
"source": "#wZoi4XVeHA72fRJA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:41.719 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:42.312 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:33:44.884+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:33:44.884+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:42.314 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:42.915 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"780"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:42.915 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hj6qBaDK0wABf3Fr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20970/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20970/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:42.915 [print] {
"resourceType": "Procedure",
"id": "20970",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:46.104+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:33:42.915 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:42.917 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"780"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:42.917 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hj6qBaDK0wABf3Fr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20970/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20970/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:42.917 [print] {
"resourceType": "Procedure",
"id": "20970",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:46.104+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:33:42.917 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:43.502 [print] {
"resourceType": "Procedure",
"id": "20970",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:46.104+02:00",
"source": "#hj6qBaDK0wABf3Fr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:44.107 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:44.749 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:33:47.304+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:33:47.304+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:44.750 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:45.361 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"774"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:45.361 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LDwIqaJrpASgaN4I"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20971/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20971/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:45.361 [print] {
"resourceType": "Procedure",
"id": "20971",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:48.556+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:33:45.361 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:45.363 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"774"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:45.363 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LDwIqaJrpASgaN4I"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20971/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20971/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:45.363 [print] {
"resourceType": "Procedure",
"id": "20971",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:48.556+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:33:45.363 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:45.962 [print] {
"resourceType": "Procedure",
"id": "20971",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:48.556+02:00",
"source": "#LDwIqaJrpASgaN4I",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:46.565 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:47.183 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:33:49.761+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:33:49.761+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:47.185 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:47.790 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"784"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:47.790 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"In3MDRSVArgM7hY8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20972/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20972/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:47.790 [print] {
"resourceType": "Procedure",
"id": "20972",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:50.986+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:33:47.790 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:47.791 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"784"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:47.791 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"In3MDRSVArgM7hY8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20972/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20972/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:47.791 [print] {
"resourceType": "Procedure",
"id": "20972",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:50.986+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:33:47.791 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:48.421 [print] {
"resourceType": "Procedure",
"id": "20972",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:50.986+02:00",
"source": "#In3MDRSVArgM7hY8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:49.139 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:49.754 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:33:52.330+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:33:52.330+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:49.755 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:50.377 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"772"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:50.377 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"O3IHCBxjWguBlfdV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20973/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20973/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:50.377 [print] {
"resourceType": "Procedure",
"id": "20973",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:53.569+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:33:50.377 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:50.378 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"772"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:50.378 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"O3IHCBxjWguBlfdV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20973/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20973/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:50.378 [print] {
"resourceType": "Procedure",
"id": "20973",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:53.569+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:33:50.378 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:51.006 [print] {
"resourceType": "Procedure",
"id": "20973",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:53.569+02:00",
"source": "#O3IHCBxjWguBlfdV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:51.622 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:52.223 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:33:54.818+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:33:54.818+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:52.224 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:52.854 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"778"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:52.854 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"67qoQbyRgpWbX4d0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20974/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20974/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:52.854 [print] {
"resourceType": "Procedure",
"id": "20974",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:56.042+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:33:52.854 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:52.855 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"778"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:52.855 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"67qoQbyRgpWbX4d0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20974/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20974/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:52.856 [print] {
"resourceType": "Procedure",
"id": "20974",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:56.042+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:33:52.856 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:53.457 [print] {
"resourceType": "Procedure",
"id": "20974",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:56.042+02:00",
"source": "#67qoQbyRgpWbX4d0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:54.081 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:54.704 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:33:57.267+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:33:57.267+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:54.705 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:55.341 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"776"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:55.341 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rFUzqAOgc0t9jbk0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20975/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20975/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:55.341 [print] {
"resourceType": "Procedure",
"id": "20975",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:58.525+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:33:55.341 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:55.343 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"776"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:55.343 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rFUzqAOgc0t9jbk0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20975/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:33:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20975/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:33:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:55.343 [print] {
"resourceType": "Procedure",
"id": "20975",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:58.525+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:33:55.343 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:55.977 [print] {
"resourceType": "Procedure",
"id": "20975",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:33:58.525+02:00",
"source": "#rFUzqAOgc0t9jbk0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:56.613 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:57.440 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:33:59.802+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:33:59.802+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:57.442 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:58.069 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"822"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:58.069 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EHBJ5EYAk07X5eyE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20976/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20976/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:58.070 [print] {
"resourceType": "Procedure",
"id": "20976",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:01.257+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:33:58.070 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:33:58.071 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"822"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:33:58.071 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EHBJ5EYAk07X5eyE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20976/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20976/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:33:58.072 [print] {
"resourceType": "Procedure",
"id": "20976",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:01.257+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:33:58.072 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:33:58.672 [print] {
"resourceType": "Procedure",
"id": "20976",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:01.257+02:00",
"source": "#EHBJ5EYAk07X5eyE",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:33:59.286 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:33:59.915 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:34:02.482+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:34:02.482+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:33:59.916 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:00.547 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"808"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:00.547 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sJt4BLjxklixkl2x"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20977/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20977/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:00.547 [print] {
"resourceType": "Procedure",
"id": "20977",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:03.742+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:34:00.547 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:00.549 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"808"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:00.549 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sJt4BLjxklixkl2x"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20977/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20977/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:00.549 [print] {
"resourceType": "Procedure",
"id": "20977",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:03.742+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:34:00.549 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:01.429 [print] {
"resourceType": "Procedure",
"id": "20977",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:03.742+02:00",
"source": "#sJt4BLjxklixkl2x",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:02.058 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:02.656 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:34:05.252+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:34:05.252+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:02.657 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:03.265 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"813"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:03.265 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LaRCqZruQgYw0arw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20978/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20978/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:03.265 [print] {
"resourceType": "Procedure",
"id": "20978",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:06.456+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:34:03.265 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:03.266 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"813"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:03.267 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LaRCqZruQgYw0arw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20978/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20978/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:03.267 [print] {
"resourceType": "Procedure",
"id": "20978",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:06.456+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:34:03.267 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:03.864 [print] {
"resourceType": "Procedure",
"id": "20978",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:06.456+02:00",
"source": "#LaRCqZruQgYw0arw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:04.461 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:05.094 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:34:07.657+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:34:07.657+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:05.096 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:05.708 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"653"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:05.708 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xWy1Oo4iqK2z4r3x"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20979/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20979/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:05.708 [print] {
"resourceType": "Procedure",
"id": "20979",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:08.902+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
}
}
> *
print COOKIES
11:34:05.708 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:05.709 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"653"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:05.710 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xWy1Oo4iqK2z4r3x"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20979/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20979/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:05.710 [print] {
"resourceType": "Procedure",
"id": "20979",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:08.902+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
}
}
> *
print COOKIES
11:34:05.710 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:06.325 [print] {
"resourceType": "Procedure",
"id": "20979",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:08.902+02:00",
"source": "#xWy1Oo4iqK2z4r3x",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
}
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:06.987 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:07.599 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:34:10.172+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:34:10.172+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:07.601 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:08.201 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"773"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:08.201 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xfAZcjTTPQSkKfTI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20980/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20980/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:08.201 [print] {
"resourceType": "Procedure",
"id": "20980",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:11.387+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:34:08.201 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:08.203 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"773"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:08.203 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xfAZcjTTPQSkKfTI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20980/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20980/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:08.203 [print] {
"resourceType": "Procedure",
"id": "20980",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:11.387+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:34:08.203 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:08.797 [print] {
"resourceType": "Procedure",
"id": "20980",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:11.387+02:00",
"source": "#xfAZcjTTPQSkKfTI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:09.462 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:10.065 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:34:12.646+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:34:12.646+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:10.067 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:10.884 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"800"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:10.884 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fBvg4S7nCWt37iwn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20981/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20981/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:10.884 [print] {
"resourceType": "Procedure",
"id": "20981",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:14.080+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:34:10.884 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:10.886 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"800"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:10.886 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fBvg4S7nCWt37iwn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20981/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20981/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:10.886 [print] {
"resourceType": "Procedure",
"id": "20981",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:14.080+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:34:10.886 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:11.519 [print] {
"resourceType": "Procedure",
"id": "20981",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:14.080+02:00",
"source": "#fBvg4S7nCWt37iwn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:12.128 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:12.735 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:34:15.320+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:34:15.320+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:12.736 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:13.367 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"816"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:13.367 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PFFW3qPIkNJLQfj2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20982/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20982/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:13.367 [print] {
"resourceType": "Procedure",
"id": "20982",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:16.559+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:34:13.367 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:13.369 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"816"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:13.369 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PFFW3qPIkNJLQfj2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20982/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20982/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:13.369 [print] {
"resourceType": "Procedure",
"id": "20982",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:16.559+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:34:13.369 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:13.976 [print] {
"resourceType": "Procedure",
"id": "20982",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:16.559+02:00",
"source": "#PFFW3qPIkNJLQfj2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:15.610 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:16.241 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:34:18.799+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:34:18.799+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:16.242 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:16.861 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"804"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:16.861 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"waWOJeRPHI1wwnnq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20983/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20983/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:16.861 [print] {
"resourceType": "Procedure",
"id": "20983",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:20.049+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:34:16.861 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:16.862 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"804"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:16.862 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"waWOJeRPHI1wwnnq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20983/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20983/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:16.862 [print] {
"resourceType": "Procedure",
"id": "20983",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:20.049+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:34:16.863 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:17.486 [print] {
"resourceType": "Procedure",
"id": "20983",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:20.049+02:00",
"source": "#waWOJeRPHI1wwnnq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:18.115 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:19.128 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:34:21.304+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:34:21.304+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:19.130 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:19.756 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"817"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:19.756 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WalCKQsJ5W5IBKht"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20984/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20984/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:19.756 [print] {
"resourceType": "Procedure",
"id": "20984",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:22.937+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:34:19.756 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:19.758 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"817"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:19.758 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WalCKQsJ5W5IBKht"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20984/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20984/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:19.758 [print] {
"resourceType": "Procedure",
"id": "20984",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:22.937+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:34:19.758 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:20.384 [print] {
"resourceType": "Procedure",
"id": "20984",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:22.937+02:00",
"source": "#WalCKQsJ5W5IBKht",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:20.977 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:21.587 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:34:24.172+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:34:24.172+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:21.588 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:22.192 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:22.192 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IqcxQno4P3gDEQ2a"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20985/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20985/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:22.192 [print] {
"resourceType": "Procedure",
"id": "20985",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:25.380+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
}
}
> *
print COOKIES
11:34:22.192 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:22.193 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"651"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:22.193 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IqcxQno4P3gDEQ2a"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20985/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20985/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:22.193 [print] {
"resourceType": "Procedure",
"id": "20985",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:25.380+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
}
}
> *
print COOKIES
11:34:22.193 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:22.797 [print] {
"resourceType": "Procedure",
"id": "20985",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:25.380+02:00",
"source": "#IqcxQno4P3gDEQ2a",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
}
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:23.408 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:24.023 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:34:26.604+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:34:26.604+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:24.024 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:24.670 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"816"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:24.670 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"n7jXna4T6gGtOCAF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20986/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20986/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:24.670 [print] {
"resourceType": "Procedure",
"id": "20986",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:27.854+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:34:24.670 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:24.671 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"816"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:24.671 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"n7jXna4T6gGtOCAF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20986/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20986/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:24.671 [print] {
"resourceType": "Procedure",
"id": "20986",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:27.854+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:34:24.671 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:25.324 [print] {
"resourceType": "Procedure",
"id": "20986",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:27.854+02:00",
"source": "#n7jXna4T6gGtOCAF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:26.328 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:27.235 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:34:29.518+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:34:29.518+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:27.236 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:27.891 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"808"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:27.891 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qA3G8jXxPMk3Fzus"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20987/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20987/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:27.891 [print] {
"resourceType": "Procedure",
"id": "20987",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:31.082+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:34:27.892 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:27.893 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"808"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:27.893 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qA3G8jXxPMk3Fzus"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20987/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20987/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:27.893 [print] {
"resourceType": "Procedure",
"id": "20987",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:31.082+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:34:27.893 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:28.491 [print] {
"resourceType": "Procedure",
"id": "20987",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:31.082+02:00",
"source": "#qA3G8jXxPMk3Fzus",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:29.504 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:31.135 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:34:32.696+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:34:32.696+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:31.137 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:31.950 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"783"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:31.950 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9sp7oFcuRHCJljHp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20988/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20988/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:31.950 [print] {
"resourceType": "Procedure",
"id": "20988",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:35.140+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:34:31.950 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:31.951 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"783"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:31.952 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9sp7oFcuRHCJljHp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20988/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20988/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:31.952 [print] {
"resourceType": "Procedure",
"id": "20988",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:35.140+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:34:31.952 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:32.560 [print] {
"resourceType": "Procedure",
"id": "20988",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:35.140+02:00",
"source": "#9sp7oFcuRHCJljHp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:33.184 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:33.783 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:34:36.373+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:34:36.373+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:33.784 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:34.402 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"772"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:34.402 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NjsvCceacyb5st5J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20989/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20989/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:34.402 [print] {
"resourceType": "Procedure",
"id": "20989",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:37.594+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:34:34.402 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:34.403 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"772"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:34.403 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NjsvCceacyb5st5J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20989/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20989/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:34.403 [print] {
"resourceType": "Procedure",
"id": "20989",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:37.594+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:34:34.403 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:35.233 [print] {
"resourceType": "Procedure",
"id": "20989",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:37.594+02:00",
"source": "#NjsvCceacyb5st5J",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:35.894 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:36.511 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:34:39.079+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:34:39.079+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:36.513 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:38.226 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"775"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:38.226 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9IjqY2crASlmKAaa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20990/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20990/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:38.226 [print] {
"resourceType": "Procedure",
"id": "20990",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:41.401+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:34:38.226 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:38.228 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"775"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:38.228 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9IjqY2crASlmKAaa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20990/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20990/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:38.228 [print] {
"resourceType": "Procedure",
"id": "20990",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:41.401+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:34:38.228 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:38.821 [print] {
"resourceType": "Procedure",
"id": "20990",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:41.401+02:00",
"source": "#9IjqY2crASlmKAaa",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:39.439 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:40.107 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:34:42.633+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:34:42.633+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:40.108 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:40.719 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"777"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:40.719 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oyS703zr2czNGwun"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20991/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20991/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:40.720 [print] {
"resourceType": "Procedure",
"id": "20991",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:43.910+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:34:40.720 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:40.721 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"777"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:40.722 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oyS703zr2czNGwun"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20991/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20991/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:40.722 [print] {
"resourceType": "Procedure",
"id": "20991",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:43.910+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:34:40.722 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:41.326 [print] {
"resourceType": "Procedure",
"id": "20991",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:43.910+02:00",
"source": "#oyS703zr2czNGwun",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:41.940 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:42.540 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:34:45.126+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:34:45.126+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:42.543 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:43.353 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"773"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:43.354 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3fx9PSWh0xLcsdYf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20992/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20992/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:43.354 [print] {
"resourceType": "Procedure",
"id": "20992",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:46.545+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:34:43.354 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:43.355 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"773"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:43.355 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3fx9PSWh0xLcsdYf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20992/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20992/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:43.355 [print] {
"resourceType": "Procedure",
"id": "20992",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:46.545+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
> *
print COOKIES
11:34:43.355 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:43.957 [print] {
"resourceType": "Procedure",
"id": "20992",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:46.545+02:00",
"source": "#3fx9PSWh0xLcsdYf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129325002",
"display": "Introducido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:45.093 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:45.704 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:34:48.286+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:34:48.286+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:45.704 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:46.319 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"759"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:46.319 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bRPHJ4JCXEh5KFNJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20993/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20993/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:46.319 [print] {
"resourceType": "Procedure",
"id": "20993",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:49.509+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:34:46.319 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:46.320 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"759"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:46.320 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bRPHJ4JCXEh5KFNJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20993/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20993/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:46.320 [print] {
"resourceType": "Procedure",
"id": "20993",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:49.509+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:34:46.320 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:46.916 [print] {
"resourceType": "Procedure",
"id": "20993",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:49.509+02:00",
"source": "#bRPHJ4JCXEh5KFNJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:47.525 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:48.133 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:34:50.718+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:34:50.718+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:48.134 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:48.745 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"811"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:48.745 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Pz5R0rrKYHnL9uyq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20994/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20994/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:48.745 [print] {
"resourceType": "Procedure",
"id": "20994",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:51.937+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:34:48.745 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:48.747 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"811"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:48.747 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Pz5R0rrKYHnL9uyq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20994/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20994/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:48.747 [print] {
"resourceType": "Procedure",
"id": "20994",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:51.937+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:34:48.747 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:49.389 [print] {
"resourceType": "Procedure",
"id": "20994",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:51.937+02:00",
"source": "#Pz5R0rrKYHnL9uyq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-280384000",
"display": "Derivación Subdural-peritoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:50.026 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:50.749 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:34:53.215+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:34:53.215+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:50.750 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:51.380 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"797"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:51.380 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rTPfavxyuizVHPNZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20995/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20995/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:51.380 [print] {
"resourceType": "Procedure",
"id": "20995",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:54.558+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:34:51.380 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:51.382 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"797"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:51.382 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rTPfavxyuizVHPNZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20995/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20995/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:51.382 [print] {
"resourceType": "Procedure",
"id": "20995",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:54.558+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:34:51.382 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:51.991 [print] {
"resourceType": "Procedure",
"id": "20995",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:54.558+02:00",
"source": "#rTPfavxyuizVHPNZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:52.606 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:53.251 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:34:55.802+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:34:55.802+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:53.252 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:53.878 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"777"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:53.878 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CtYEFfSMZHOlxD7U"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20996/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20996/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:53.878 [print] {
"resourceType": "Procedure",
"id": "20996",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:57.069+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:34:53.878 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:53.880 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"777"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:53.880 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CtYEFfSMZHOlxD7U"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20996/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:34:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20996/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:34:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:53.880 [print] {
"resourceType": "Procedure",
"id": "20996",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:57.069+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:34:53.880 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:54.493 [print] {
"resourceType": "Procedure",
"id": "20996",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:34:57.069+02:00",
"source": "#CtYEFfSMZHOlxD7U",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:55.365 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:56.245 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:34:58.537+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:34:58.537+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:56.246 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:56.875 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"811"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:56.875 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CbT4nnzHJrchdsxM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20997/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20997/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:56.875 [print] {
"resourceType": "Procedure",
"id": "20997",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:00.046+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:34:56.875 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:56.876 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"811"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:56.876 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CbT4nnzHJrchdsxM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20997/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20997/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:56.876 [print] {
"resourceType": "Procedure",
"id": "20997",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:00.046+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
> *
print COOKIES
11:34:56.876 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:34:57.491 [print] {
"resourceType": "Procedure",
"id": "20997",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:00.046+02:00",
"source": "#CbT4nnzHJrchdsxM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "not-applicable",
"display": "No Aplica"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:34:58.145 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 13ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 13ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:34:58.811 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:35:01.319+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:35:01.319+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:34:58.812 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:59.477 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"658"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:59.477 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"agQ8xrqYWjcuzzIP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20998/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20998/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:59.477 [print] {
"resourceType": "Procedure",
"id": "20998",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:02.635+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
}
}
> *
print COOKIES
11:34:59.477 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:34:59.479 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"658"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:34:59.479 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"agQ8xrqYWjcuzzIP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20998/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20998/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:34:59.479 [print] {
"resourceType": "Procedure",
"id": "20998",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:02.635+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
}
}
> *
print COOKIES
11:34:59.479 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:00.083 [print] {
"resourceType": "Procedure",
"id": "20998",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:02.635+02:00",
"source": "#agQ8xrqYWjcuzzIP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-265218003",
"display": "Cisternostomía (III ventrículo)"
}
]
}
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:00.929 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:01.545 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:35:04.107+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:35:04.107+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:01.546 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:03.157 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"770"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:03.158 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KfUJFyHAxeLrCzUJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20999/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20999/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:03.158 [print] {
"resourceType": "Procedure",
"id": "20999",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:06.347+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:35:03.158 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:03.159 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"770"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:03.159 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KfUJFyHAxeLrCzUJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20999/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/20999/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:03.159 [print] {
"resourceType": "Procedure",
"id": "20999",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:06.347+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:35:03.159 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:04.068 [print] {
"resourceType": "Procedure",
"id": "20999",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:06.347+02:00",
"source": "#KfUJFyHAxeLrCzUJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "24028007",
"display": "Right (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:04.691 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:05.342 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:35:07.880+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:35:07.880+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:05.344 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:05.968 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"770"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:05.968 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VYlJVfugZhy5lXQY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21000/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21000/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:05.968 [print] {
"resourceType": "Procedure",
"id": "21000",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:09.143+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:35:05.968 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:05.970 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"770"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:05.970 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VYlJVfugZhy5lXQY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21000/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21000/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:05.970 [print] {
"resourceType": "Procedure",
"id": "21000",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:09.143+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
> *
print COOKIES
11:35:05.970 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:06.584 [print] {
"resourceType": "Procedure",
"id": "21000",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:09.143+02:00",
"source": "#VYlJVfugZhy5lXQY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "51440002",
"display": "Right and left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-other",
"display": "Otro tipo de derivación"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129303008",
"display": "Retirado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:07.205 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:07.812 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:35:10.388+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:35:10.388+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:07.814 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:08.457 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"768"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:08.457 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vm6h71mZdWhYYblx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21001/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21001/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:08.457 [print] {
"resourceType": "Procedure",
"id": "21001",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:11.626+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:35:08.457 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:08.458 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"768"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:08.459 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vm6h71mZdWhYYblx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21001/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21001/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:08.459 [print] {
"resourceType": "Procedure",
"id": "21001",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:11.626+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
> *
print COOKIES
11:35:08.459 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:09.046 [print] {
"resourceType": "Procedure",
"id": "21001",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:11.626+02:00",
"source": "#vm6h71mZdWhYYblx",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "7771000",
"display": "Left (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-4579008",
"display": "Derivación Ventriculo-atrial"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "129336009",
"display": "Implantado"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:09.649 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:10.290 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:35:12.843+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:35:12.843+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:10.292 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:10.919 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"811"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:10.919 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ElvZt7SkCq068uQZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21002/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21002/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:10.919 [print] {
"resourceType": "Procedure",
"id": "21002",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:14.104+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:35:10.919 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:10.920 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"811"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:10.920 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ElvZt7SkCq068uQZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21002/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21002/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:10.920 [print] {
"resourceType": "Procedure",
"id": "21002",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:14.104+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
> *
print COOKIES
11:35:10.920 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:11.553 [print] {
"resourceType": "Procedure",
"id": "21002",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:14.104+02:00",
"source": "#ElvZt7SkCq068uQZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"extension": [
{
"url": "http://hl7.eu/fhir/ig/pcsp/StructureDefinition/mcode-laterality-qualifier",
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "399488007",
"display": "Midline (qualifier value)"
}
]
}
}
],
"status": "completed",
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": " sht-47020004",
"display": "Derivación Ventriculoperitoneal"
}
]
},
"focalDevice": [
{
"action": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
"code": "unknown",
"display": "Desconocido"
}
]
}
}
]
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:12.203 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:14.454 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:35:15.391+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:35:15.391+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:14.455 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:15.088 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:15.088 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"i5REzH5Ml2VXFtEw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21003/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21003/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:15.088 [print] {
"resourceType": "Procedure",
"id": "21003",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:18.276+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:15.088 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:15.089 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:15.089 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"i5REzH5Ml2VXFtEw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21003/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21003/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:15.089 [print] {
"resourceType": "Procedure",
"id": "21003",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:18.276+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:15.089 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:15.728 [print] {
"resourceType": "Procedure",
"id": "21003",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:18.276+02:00",
"source": "#i5REzH5Ml2VXFtEw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:16.382 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:17.023 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:35:19.544+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:35:19.544+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:17.025 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:18.272 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:18.272 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yX8S32J1qlmVSJX6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21004/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21004/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:18.272 [print] {
"resourceType": "Procedure",
"id": "21004",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:21.460+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:18.272 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:18.274 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:18.274 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yX8S32J1qlmVSJX6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21004/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21004/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:18.274 [print] {
"resourceType": "Procedure",
"id": "21004",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:21.460+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:18.274 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:18.871 [print] {
"resourceType": "Procedure",
"id": "21004",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:21.460+02:00",
"source": "#yX8S32J1qlmVSJX6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:19.472 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:20.210 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:35:22.666+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:35:22.666+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:20.211 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:21.013 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:21.013 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"n2gkKhzD97nEnIJN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21005/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21005/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:21.013 [print] {
"resourceType": "Procedure",
"id": "21005",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:24.207+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:21.013 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:21.014 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:21.014 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"n2gkKhzD97nEnIJN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21005/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21005/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:21.014 [print] {
"resourceType": "Procedure",
"id": "21005",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:24.207+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:21.014 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:21.658 [print] {
"resourceType": "Procedure",
"id": "21005",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:24.207+02:00",
"source": "#n2gkKhzD97nEnIJN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:22.283 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:22.878 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:35:25.473+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:35:25.473+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:22.879 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:23.486 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:23.486 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Fb0PEmXSMml90RI7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21006/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21006/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:23.486 [print] {
"resourceType": "Procedure",
"id": "21006",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:26.681+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:23.486 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:23.488 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:23.488 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Fb0PEmXSMml90RI7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21006/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21006/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:23.488 [print] {
"resourceType": "Procedure",
"id": "21006",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:26.681+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:23.488 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:24.107 [print] {
"resourceType": "Procedure",
"id": "21006",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:26.681+02:00",
"source": "#Fb0PEmXSMml90RI7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:24.726 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:25.343 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:35:27.919+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:35:27.919+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:25.344 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:25.953 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:25.954 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"d8DhqU34nAmYcjFo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21007/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21007/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:25.954 [print] {
"resourceType": "Procedure",
"id": "21007",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:29.147+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:25.954 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:25.955 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:25.955 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"d8DhqU34nAmYcjFo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21007/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21007/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:25.955 [print] {
"resourceType": "Procedure",
"id": "21007",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:29.147+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:25.955 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:27.553 [print] {
"resourceType": "Procedure",
"id": "21007",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:29.147+02:00",
"source": "#d8DhqU34nAmYcjFo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:28.184 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:28.799 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:35:31.379+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:35:31.379+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:28.800 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:29.421 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:29.421 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"N59tXu0MyaFETg1i"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21008/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21008/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:29.421 [print] {
"resourceType": "Procedure",
"id": "21008",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:32.605+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:29.421 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:29.422 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:29.422 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"N59tXu0MyaFETg1i"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21008/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21008/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:29.422 [print] {
"resourceType": "Procedure",
"id": "21008",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:32.605+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:29.422 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:30.039 [print] {
"resourceType": "Procedure",
"id": "21008",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:32.605+02:00",
"source": "#N59tXu0MyaFETg1i",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:30.672 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:31.291 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:35:33.866+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:35:33.866+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:31.292 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:31.964 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:31.964 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OyuEMvHW0NYrwqUj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21009/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21009/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:31.964 [print] {
"resourceType": "Procedure",
"id": "21009",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:35.156+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:31.964 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:31.966 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:31.966 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OyuEMvHW0NYrwqUj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21009/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21009/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:31.966 [print] {
"resourceType": "Procedure",
"id": "21009",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:35.156+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:31.966 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:32.569 [print] {
"resourceType": "Procedure",
"id": "21009",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:35.156+02:00",
"source": "#OyuEMvHW0NYrwqUj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:33.188 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:33.790 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:35:36.384+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:35:36.384+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:33.791 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:34.401 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:34.401 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ys0u0HEXXY3k3A8b"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21010/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21010/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:34.401 [print] {
"resourceType": "Procedure",
"id": "21010",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:37.594+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:34.401 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:34.403 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:34.403 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ys0u0HEXXY3k3A8b"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21010/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21010/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:34.403 [print] {
"resourceType": "Procedure",
"id": "21010",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:37.594+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:34.403 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:35.009 [print] {
"resourceType": "Procedure",
"id": "21010",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:37.594+02:00",
"source": "#Ys0u0HEXXY3k3A8b",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:35.638 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:36.246 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:35:38.825+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:35:38.825+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:36.247 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:36.865 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:36.865 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NZkxQM3Hcrb0kKXL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21011/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21011/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:36.865 [print] {
"resourceType": "Procedure",
"id": "21011",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:40.058+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:36.866 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:36.867 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:36.867 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NZkxQM3Hcrb0kKXL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21011/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21011/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:36.867 [print] {
"resourceType": "Procedure",
"id": "21011",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:40.058+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:36.867 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:37.478 [print] {
"resourceType": "Procedure",
"id": "21011",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:40.058+02:00",
"source": "#NZkxQM3Hcrb0kKXL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:38.106 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:38.734 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:35:41.295+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:35:41.295+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:38.736 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:39.361 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:39.361 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Z0g2NN83SPRGKNb2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21012/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21012/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:39.361 [print] {
"resourceType": "Procedure",
"id": "21012",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:42.550+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:39.361 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:39.363 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:39.363 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Z0g2NN83SPRGKNb2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21012/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21012/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:39.363 [print] {
"resourceType": "Procedure",
"id": "21012",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:42.550+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:39.364 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:40.243 [print] {
"resourceType": "Procedure",
"id": "21012",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:42.550+02:00",
"source": "#Z0g2NN83SPRGKNb2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:40.868 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:41.572 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:35:44.056+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:35:44.056+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:41.573 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:42.217 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:42.217 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dQ1ZpCFlmwXhy6ZM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21013/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21013/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:42.217 [print] {
"resourceType": "Procedure",
"id": "21013",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:45.367+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:42.217 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:42.219 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:42.219 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dQ1ZpCFlmwXhy6ZM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21013/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21013/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:42.219 [print] {
"resourceType": "Procedure",
"id": "21013",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:45.367+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:42.219 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:42.845 [print] {
"resourceType": "Procedure",
"id": "21013",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:45.367+02:00",
"source": "#dQ1ZpCFlmwXhy6ZM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:43.506 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:44.141 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:35:46.686+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:35:46.686+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:44.142 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:44.780 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:44.780 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7qOCWXyUWaYsVm3o"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21014/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21014/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:44.780 [print] {
"resourceType": "Procedure",
"id": "21014",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:47.961+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:44.780 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:44.781 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:44.781 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7qOCWXyUWaYsVm3o"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21014/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21014/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:44.781 [print] {
"resourceType": "Procedure",
"id": "21014",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:47.961+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:44.781 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:45.658 [print] {
"resourceType": "Procedure",
"id": "21014",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:47.961+02:00",
"source": "#7qOCWXyUWaYsVm3o",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:46.270 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:46.881 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:35:49.460+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:35:49.460+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:46.882 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:47.506 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:47.506 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gn6NGowkiEfPm9gZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21015/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21015/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:47.506 [print] {
"resourceType": "Procedure",
"id": "21015",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:50.691+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:47.506 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:47.507 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:47.508 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gn6NGowkiEfPm9gZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21015/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21015/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:47.508 [print] {
"resourceType": "Procedure",
"id": "21015",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:50.691+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:47.508 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:48.120 [print] {
"resourceType": "Procedure",
"id": "21015",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:50.691+02:00",
"source": "#gn6NGowkiEfPm9gZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:48.745 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:49.359 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:35:51.940+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:35:51.940+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:49.360 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:50.001 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:50.001 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qYDOEtBIzihmXIZa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21016/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21016/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:50.001 [print] {
"resourceType": "Procedure",
"id": "21016",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:53.188+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:50.001 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:50.002 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:50.002 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qYDOEtBIzihmXIZa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21016/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21016/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:50.002 [print] {
"resourceType": "Procedure",
"id": "21016",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:53.188+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:50.002 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:50.595 [print] {
"resourceType": "Procedure",
"id": "21016",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:53.188+02:00",
"source": "#qYDOEtBIzihmXIZa",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:51.221 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:51.863 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:35:54.413+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:35:54.413+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:51.865 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:52.497 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:52.497 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"M7So2olbNEj4Er4B"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21017/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21017/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:52.497 [print] {
"resourceType": "Procedure",
"id": "21017",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:55.688+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:52.497 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:52.498 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:52.498 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"M7So2olbNEj4Er4B"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21017/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21017/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:52.498 [print] {
"resourceType": "Procedure",
"id": "21017",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:55.688+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:52.498 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:53.109 [print] {
"resourceType": "Procedure",
"id": "21017",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:55.688+02:00",
"source": "#M7So2olbNEj4Er4B",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:53.708 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:54.330 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:35:56.904+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:35:56.904+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:54.331 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:54.982 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:54.982 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bwscaXw5NEKXSIC9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21018/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21018/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:54.982 [print] {
"resourceType": "Procedure",
"id": "21018",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:58.165+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:54.982 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:54.983 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:54.983 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bwscaXw5NEKXSIC9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21018/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:35:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21018/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:35:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:54.983 [print] {
"resourceType": "Procedure",
"id": "21018",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:58.165+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:54.983 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:55.607 [print] {
"resourceType": "Procedure",
"id": "21018",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:35:58.165+02:00",
"source": "#bwscaXw5NEKXSIC9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:56.222 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:56.838 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:35:59.416+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:35:59.416+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:56.839 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:57.574 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:57.574 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"t8TycWBJZ0ePQbdp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21019/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21019/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:57.574 [print] {
"resourceType": "Procedure",
"id": "21019",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:00.765+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:57.574 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:35:57.575 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:35:57.575 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"t8TycWBJZ0ePQbdp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21019/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21019/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:35:57.575 [print] {
"resourceType": "Procedure",
"id": "21019",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:00.765+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:35:57.575 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:35:58.177 [print] {
"resourceType": "Procedure",
"id": "21019",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:00.765+02:00",
"source": "#t8TycWBJZ0ePQbdp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:35:58.835 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:35:59.475 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:36:02.027+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:36:02.027+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:35:59.476 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:00.105 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:00.105 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"voqP26g8ldE3Rx8S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21020/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21020/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:00.105 [print] {
"resourceType": "Procedure",
"id": "21020",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:03.294+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:00.105 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:00.106 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:00.106 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"voqP26g8ldE3Rx8S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21020/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21020/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:00.106 [print] {
"resourceType": "Procedure",
"id": "21020",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:03.294+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:00.106 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:00.707 [print] {
"resourceType": "Procedure",
"id": "21020",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:03.294+02:00",
"source": "#voqP26g8ldE3Rx8S",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:01.358 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:01.951 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:36:04.536+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:36:04.536+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:01.953 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:02.554 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:02.554 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GjpEhhbrJ1xWz7xs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21021/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21021/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:02.554 [print] {
"resourceType": "Procedure",
"id": "21021",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:05.742+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:02.554 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:02.556 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:02.556 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GjpEhhbrJ1xWz7xs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21021/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21021/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:02.556 [print] {
"resourceType": "Procedure",
"id": "21021",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:05.742+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:02.556 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:03.154 [print] {
"resourceType": "Procedure",
"id": "21021",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:05.742+02:00",
"source": "#GjpEhhbrJ1xWz7xs",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:03.786 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 16ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 16ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:04.405 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:36:06.976+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:36:06.976+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:04.406 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:05.142 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:05.142 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"B1m3OlIFByuUMpnS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21022/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21022/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:05.142 [print] {
"resourceType": "Procedure",
"id": "21022",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:08.326+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:05.142 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:05.143 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:05.143 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"B1m3OlIFByuUMpnS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21022/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21022/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:05.143 [print] {
"resourceType": "Procedure",
"id": "21022",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:08.326+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:05.143 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:05.801 [print] {
"resourceType": "Procedure",
"id": "21022",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:08.326+02:00",
"source": "#B1m3OlIFByuUMpnS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:06.720 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:07.337 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:36:09.914+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:36:09.914+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:07.338 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:07.959 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:07.959 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HS14mMdr72QAMSQ1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21023/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21023/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:07.959 [print] {
"resourceType": "Procedure",
"id": "21023",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:11.139+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:07.959 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:07.960 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:07.960 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HS14mMdr72QAMSQ1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21023/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21023/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:07.960 [print] {
"resourceType": "Procedure",
"id": "21023",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:11.139+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:07.960 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:08.595 [print] {
"resourceType": "Procedure",
"id": "21023",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:11.139+02:00",
"source": "#HS14mMdr72QAMSQ1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:09.208 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:09.845 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:36:12.398+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:36:12.398+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:09.847 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:10.472 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:10.472 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nM64AwKxlKmzSLna"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21024/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21024/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:10.472 [print] {
"resourceType": "Procedure",
"id": "21024",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:13.664+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:10.472 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:10.474 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:10.474 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nM64AwKxlKmzSLna"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21024/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21024/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:10.474 [print] {
"resourceType": "Procedure",
"id": "21024",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:13.664+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:10.474 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:11.089 [print] {
"resourceType": "Procedure",
"id": "21024",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:13.664+02:00",
"source": "#nM64AwKxlKmzSLna",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:11.728 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:12.362 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:36:14.917+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:36:14.917+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:12.363 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:12.963 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:12.963 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"u6qn0M4XizNAjf1t"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21025/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21025/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:12.963 [print] {
"resourceType": "Procedure",
"id": "21025",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:16.148+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:12.963 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:12.964 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:12.964 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"u6qn0M4XizNAjf1t"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21025/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21025/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:12.964 [print] {
"resourceType": "Procedure",
"id": "21025",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:16.148+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:12.964 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:13.567 [print] {
"resourceType": "Procedure",
"id": "21025",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:16.148+02:00",
"source": "#u6qn0M4XizNAjf1t",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:14.206 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:14.810 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:36:17.397+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:36:17.397+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:14.811 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:15.446 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:15.446 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pvG7PXY3gfBMU5cs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21026/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21026/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:15.446 [print] {
"resourceType": "Procedure",
"id": "21026",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:18.626+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:15.446 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:15.448 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:15.448 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pvG7PXY3gfBMU5cs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21026/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21026/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:15.448 [print] {
"resourceType": "Procedure",
"id": "21026",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:18.626+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:15.448 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:16.082 [print] {
"resourceType": "Procedure",
"id": "21026",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:18.626+02:00",
"source": "#pvG7PXY3gfBMU5cs",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:16.700 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:17.522 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:36:19.880+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:36:19.880+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:17.523 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:18.160 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:18.160 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Y6isRkkSTqqmvMQ1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21027/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21027/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:18.160 [print] {
"resourceType": "Procedure",
"id": "21027",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:21.342+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:18.160 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:18.161 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:18.161 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Y6isRkkSTqqmvMQ1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21027/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21027/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:18.161 [print] {
"resourceType": "Procedure",
"id": "21027",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:21.342+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:18.161 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:18.749 [print] {
"resourceType": "Procedure",
"id": "21027",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:21.342+02:00",
"source": "#Y6isRkkSTqqmvMQ1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:19.376 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:19.983 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:36:22.558+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:36:22.558+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:19.984 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:20.654 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:20.654 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"60bH7FcEpptEjARp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21028/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21028/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:20.654 [print] {
"resourceType": "Procedure",
"id": "21028",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:23.832+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:20.654 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:20.656 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:20.656 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"60bH7FcEpptEjARp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21028/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21028/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:20.656 [print] {
"resourceType": "Procedure",
"id": "21028",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:23.832+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:20.656 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:21.271 [print] {
"resourceType": "Procedure",
"id": "21028",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:23.832+02:00",
"source": "#60bH7FcEpptEjARp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:21.999 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:22.591 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:36:25.192+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:36:25.192+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:22.593 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:23.211 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:23.211 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YHismk48KMxy5tiQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21029/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21029/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:23.211 [print] {
"resourceType": "Procedure",
"id": "21029",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:26.394+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:23.211 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:23.213 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:23.213 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YHismk48KMxy5tiQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21029/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21029/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:23.213 [print] {
"resourceType": "Procedure",
"id": "21029",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:26.394+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:23.213 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:23.823 [print] {
"resourceType": "Procedure",
"id": "21029",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:26.394+02:00",
"source": "#YHismk48KMxy5tiQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:24.577 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:25.238 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:36:27.689+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:36:27.689+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:25.239 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:25.892 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:25.892 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eXJOsUOYK4BikmQW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21030/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21030/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:25.892 [print] {
"resourceType": "Procedure",
"id": "21030",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:29.074+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:25.892 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:25.893 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:25.893 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eXJOsUOYK4BikmQW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21030/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21030/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:25.893 [print] {
"resourceType": "Procedure",
"id": "21030",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:29.074+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:25.893 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:26.509 [print] {
"resourceType": "Procedure",
"id": "21030",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:29.074+02:00",
"source": "#eXJOsUOYK4BikmQW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:27.138 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:27.764 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:36:30.325+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:36:30.325+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:27.765 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:28.380 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:28.380 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TLG7ua6wiRNKZcDr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21031/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21031/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:28.380 [print] {
"resourceType": "Procedure",
"id": "21031",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:31.573+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:28.380 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:28.381 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:28.382 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TLG7ua6wiRNKZcDr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21031/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21031/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:28.382 [print] {
"resourceType": "Procedure",
"id": "21031",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:31.573+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:28.382 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:29.070 [print] {
"resourceType": "Procedure",
"id": "21031",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:31.573+02:00",
"source": "#TLG7ua6wiRNKZcDr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:29.741 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:30.364 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:36:32.918+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:36:32.918+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:30.365 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:31.023 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:31.023 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5khDRHjDwSVS9m8j"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21032/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21032/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:31.024 [print] {
"resourceType": "Procedure",
"id": "21032",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:34.215+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:31.024 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:31.025 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:31.025 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5khDRHjDwSVS9m8j"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21032/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21032/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:31.025 [print] {
"resourceType": "Procedure",
"id": "21032",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:34.215+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:31.025 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:31.615 [print] {
"resourceType": "Procedure",
"id": "21032",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:34.215+02:00",
"source": "#5khDRHjDwSVS9m8j",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:32.248 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:32.861 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:36:35.436+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:36:35.436+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:32.863 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:33.459 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:33.459 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YlCZyJIN4wez7VYc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21033/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21033/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:33.459 [print] {
"resourceType": "Procedure",
"id": "21033",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:36.650+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:33.459 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:33.461 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:33.461 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YlCZyJIN4wez7VYc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21033/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21033/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:33.461 [print] {
"resourceType": "Procedure",
"id": "21033",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:36.650+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:33.461 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:34.092 [print] {
"resourceType": "Procedure",
"id": "21033",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:36.650+02:00",
"source": "#YlCZyJIN4wez7VYc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:34.731 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:35.334 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:36:37.913+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:36:37.913+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:35.335 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:35.957 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:35.957 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"t1T1P07TdnXbLgYS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21034/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21034/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:35.957 [print] {
"resourceType": "Procedure",
"id": "21034",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:39.149+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:35.957 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:35.959 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:35.959 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"t1T1P07TdnXbLgYS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21034/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21034/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:35.959 [print] {
"resourceType": "Procedure",
"id": "21034",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:39.149+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:35.959 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:36.591 [print] {
"resourceType": "Procedure",
"id": "21034",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:39.149+02:00",
"source": "#t1T1P07TdnXbLgYS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:37.203 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:37.852 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:36:40.394+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:36:40.394+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:37.853 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:38.456 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:38.456 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QlY79A6SndoOWXbW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21035/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21035/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:38.456 [print] {
"resourceType": "Procedure",
"id": "21035",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:41.648+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:38.456 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:38.458 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:38.458 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QlY79A6SndoOWXbW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21035/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21035/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:38.458 [print] {
"resourceType": "Procedure",
"id": "21035",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:41.648+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:38.458 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:39.073 [print] {
"resourceType": "Procedure",
"id": "21035",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:41.648+02:00",
"source": "#QlY79A6SndoOWXbW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:39.730 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:40.355 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:36:42.896+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:36:42.896+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:40.357 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:40.987 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:40.987 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iXbaIhcdG0fwvwkK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21036/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21036/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:40.987 [print] {
"resourceType": "Procedure",
"id": "21036",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:44.178+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:40.987 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:40.988 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:40.988 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iXbaIhcdG0fwvwkK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21036/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21036/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:40.988 [print] {
"resourceType": "Procedure",
"id": "21036",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:44.178+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:40.988 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:41.600 [print] {
"resourceType": "Procedure",
"id": "21036",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:44.178+02:00",
"source": "#iXbaIhcdG0fwvwkK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:42.226 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:42.820 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:36:45.420+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:36:45.420+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:42.821 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:43.493 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:43.493 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EICoJtlQXBDUz3Nj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21037/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21037/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:43.493 [print] {
"resourceType": "Procedure",
"id": "21037",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:46.662+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:43.493 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:43.494 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:43.494 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EICoJtlQXBDUz3Nj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21037/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21037/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:43.494 [print] {
"resourceType": "Procedure",
"id": "21037",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:46.662+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:43.494 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:44.110 [print] {
"resourceType": "Procedure",
"id": "21037",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:46.662+02:00",
"source": "#EICoJtlQXBDUz3Nj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:44.730 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:45.362 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:36:47.912+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:36:47.912+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:45.363 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:45.967 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:45.967 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ULrt5J6NHVfWrCIi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21038/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21038/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:45.967 [print] {
"resourceType": "Procedure",
"id": "21038",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:49.161+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:45.967 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:45.968 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:45.968 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ULrt5J6NHVfWrCIi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21038/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21038/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:45.968 [print] {
"resourceType": "Procedure",
"id": "21038",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:49.161+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:45.969 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:46.558 [print] {
"resourceType": "Procedure",
"id": "21038",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:49.161+02:00",
"source": "#ULrt5J6NHVfWrCIi",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:47.181 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:47.775 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:36:50.370+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:36:50.370+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:47.776 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:48.401 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:48.401 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ikWEviiEtlbpjbvh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21039/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21039/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:48.401 [print] {
"resourceType": "Procedure",
"id": "21039",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:51.579+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:48.401 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:48.402 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:48.403 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ikWEviiEtlbpjbvh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21039/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21039/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:48.403 [print] {
"resourceType": "Procedure",
"id": "21039",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:51.579+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:48.403 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:49.022 [print] {
"resourceType": "Procedure",
"id": "21039",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:51.579+02:00",
"source": "#ikWEviiEtlbpjbvh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:49.671 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 12ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 12ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:50.294 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:36:52.852+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:36:52.852+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:50.295 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:50.913 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:50.913 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WbHibXecODBsqux5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21040/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21040/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:50.913 [print] {
"resourceType": "Procedure",
"id": "21040",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:54.089+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:50.913 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:50.914 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:50.914 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WbHibXecODBsqux5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21040/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21040/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:50.914 [print] {
"resourceType": "Procedure",
"id": "21040",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:54.089+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:50.914 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:52.534 [print] {
"resourceType": "Procedure",
"id": "21040",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:54.089+02:00",
"source": "#WbHibXecODBsqux5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:53.154 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:53.764 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:36:56.349+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:36:56.349+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:53.765 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:54.607 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:54.607 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"atuPhyRASyo75nPR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21041/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21041/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:54.607 [print] {
"resourceType": "Procedure",
"id": "21041",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:57.801+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:54.607 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:54.608 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:54.608 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"atuPhyRASyo75nPR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21041/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:36:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21041/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:54.608 [print] {
"resourceType": "Procedure",
"id": "21041",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:57.801+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:54.608 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:55.219 [print] {
"resourceType": "Procedure",
"id": "21041",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:36:57.801+02:00",
"source": "#atuPhyRASyo75nPR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:55.867 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:56.477 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:36:59.059+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:36:59.059+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:56.479 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:57.096 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:57.096 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YrtEU7sw6eMIQ29X"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21042/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21042/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:57.096 [print] {
"resourceType": "Procedure",
"id": "21042",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:00.272+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:57.096 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:36:57.097 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:36:57.097 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YrtEU7sw6eMIQ29X"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21042/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21042/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:36:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:36:57.098 [print] {
"resourceType": "Procedure",
"id": "21042",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:00.272+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:36:57.098 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:36:58.091 [print] {
"resourceType": "Procedure",
"id": "21042",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:00.272+02:00",
"source": "#YrtEU7sw6eMIQ29X",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:36:58.721 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:36:59.559 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:37:01.908+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:37:01.908+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:36:59.560 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:00.188 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:00.188 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"srC3K1TAQakn9p2k"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21043/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21043/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:00.188 [print] {
"resourceType": "Procedure",
"id": "21043",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:03.382+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:00.188 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:00.190 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:00.190 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"srC3K1TAQakn9p2k"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21043/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21043/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:00.190 [print] {
"resourceType": "Procedure",
"id": "21043",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:03.382+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:00.190 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:00.838 [print] {
"resourceType": "Procedure",
"id": "21043",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:03.382+02:00",
"source": "#srC3K1TAQakn9p2k",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:01.449 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:02.094 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:37:04.637+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:37:04.637+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:02.095 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:02.915 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:02.915 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ab2z48tx6wOez8Ac"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21044/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21044/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:02.915 [print] {
"resourceType": "Procedure",
"id": "21044",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:06.105+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:02.915 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:02.917 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:02.917 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ab2z48tx6wOez8Ac"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21044/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21044/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:02.917 [print] {
"resourceType": "Procedure",
"id": "21044",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:06.105+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:02.917 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:03.539 [print] {
"resourceType": "Procedure",
"id": "21044",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:06.105+02:00",
"source": "#Ab2z48tx6wOez8Ac",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:04.193 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:04.803 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:37:07.365+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:37:07.365+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:04.805 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:05.429 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:05.429 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PCHWQIGUCVqPIMB6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21045/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21045/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:05.429 [print] {
"resourceType": "Procedure",
"id": "21045",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:08.618+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:05.429 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:05.431 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:05.431 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PCHWQIGUCVqPIMB6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21045/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21045/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:05.431 [print] {
"resourceType": "Procedure",
"id": "21045",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:08.618+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:05.431 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:06.028 [print] {
"resourceType": "Procedure",
"id": "21045",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:08.618+02:00",
"source": "#PCHWQIGUCVqPIMB6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:06.690 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:07.286 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:37:09.876+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:37:09.876+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:07.287 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:07.881 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:07.881 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eQ5aUDYoLgMSfHO1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21046/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21046/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:07.881 [print] {
"resourceType": "Procedure",
"id": "21046",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:11.069+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:07.881 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:07.882 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:07.882 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eQ5aUDYoLgMSfHO1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21046/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21046/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:07.882 [print] {
"resourceType": "Procedure",
"id": "21046",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:11.069+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:07.882 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:08.690 [print] {
"resourceType": "Procedure",
"id": "21046",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:11.069+02:00",
"source": "#eQ5aUDYoLgMSfHO1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:09.316 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:09.919 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:37:12.503+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:37:12.503+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:09.920 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:10.526 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:10.526 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GIjTxhgS6AVXlHH8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21047/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21047/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:10.526 [print] {
"resourceType": "Procedure",
"id": "21047",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:13.714+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:10.526 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:10.528 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:10.528 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GIjTxhgS6AVXlHH8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21047/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21047/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:10.528 [print] {
"resourceType": "Procedure",
"id": "21047",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:13.714+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:10.528 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:11.129 [print] {
"resourceType": "Procedure",
"id": "21047",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:13.714+02:00",
"source": "#GIjTxhgS6AVXlHH8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:11.766 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:12.582 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:37:14.954+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:37:14.954+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:12.584 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:13.167 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:13.167 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4CPuwHFVF8su47vT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21048/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21048/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:13.167 [print] {
"resourceType": "Procedure",
"id": "21048",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:16.360+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:13.167 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:13.168 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:13.168 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4CPuwHFVF8su47vT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21048/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21048/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:13.168 [print] {
"resourceType": "Procedure",
"id": "21048",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:16.360+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:13.168 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:13.768 [print] {
"resourceType": "Procedure",
"id": "21048",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:16.360+02:00",
"source": "#4CPuwHFVF8su47vT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:14.395 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:14.994 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:37:17.579+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:37:17.579+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:14.996 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:15.612 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:15.612 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PCdYClg0c9yNh1ri"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21049/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21049/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:15.612 [print] {
"resourceType": "Procedure",
"id": "21049",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:18.802+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:15.612 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:15.613 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:15.614 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PCdYClg0c9yNh1ri"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21049/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21049/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:15.614 [print] {
"resourceType": "Procedure",
"id": "21049",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:18.802+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:15.614 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:16.213 [print] {
"resourceType": "Procedure",
"id": "21049",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:18.802+02:00",
"source": "#PCdYClg0c9yNh1ri",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:16.829 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:17.457 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:37:20.022+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:37:20.022+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:17.459 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:18.078 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:18.078 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nWRdMQkAAPGvNDWW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21050/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21050/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:18.078 [print] {
"resourceType": "Procedure",
"id": "21050",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:21.266+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:18.078 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:18.079 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:18.079 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nWRdMQkAAPGvNDWW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21050/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21050/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:18.079 [print] {
"resourceType": "Procedure",
"id": "21050",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:21.266+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:18.079 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:18.678 [print] {
"resourceType": "Procedure",
"id": "21050",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:21.266+02:00",
"source": "#nWRdMQkAAPGvNDWW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:19.304 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:19.917 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:37:22.495+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:37:22.495+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:19.919 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:20.550 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:20.550 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ivrgvsIx5Dj8mnMi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21051/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21051/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:20.550 [print] {
"resourceType": "Procedure",
"id": "21051",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:23.740+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:20.550 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:20.551 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:20.551 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ivrgvsIx5Dj8mnMi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21051/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21051/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:20.551 [print] {
"resourceType": "Procedure",
"id": "21051",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:23.740+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:20.552 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:21.155 [print] {
"resourceType": "Procedure",
"id": "21051",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:23.740+02:00",
"source": "#ivrgvsIx5Dj8mnMi",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:21.773 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:22.374 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:37:24.959+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:37:24.959+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:22.376 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:23.002 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:23.005 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fmOJbWzyoJVLMJvX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21052/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21052/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:23.005 [print] {
"resourceType": "Procedure",
"id": "21052",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:26.184+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:23.005 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:23.007 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:23.007 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fmOJbWzyoJVLMJvX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21052/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21052/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:23.007 [print] {
"resourceType": "Procedure",
"id": "21052",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:26.184+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:23.007 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:23.622 [print] {
"resourceType": "Procedure",
"id": "21052",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:26.184+02:00",
"source": "#fmOJbWzyoJVLMJvX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:24.247 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:24.881 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:37:27.434+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:37:27.434+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:24.883 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:25.521 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:25.521 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WHHO15lSWCaUaTiA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21053/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21053/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:25.521 [print] {
"resourceType": "Procedure",
"id": "21053",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:28.699+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:25.521 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:25.522 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:25.522 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WHHO15lSWCaUaTiA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21053/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21053/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:25.522 [print] {
"resourceType": "Procedure",
"id": "21053",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:28.699+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:25.522 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:26.171 [print] {
"resourceType": "Procedure",
"id": "21053",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:28.699+02:00",
"source": "#WHHO15lSWCaUaTiA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:26.790 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:27.387 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:37:29.977+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:37:29.977+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:27.388 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:28.000 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:28.000 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jQ0Jmsjxft2iPBPf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21054/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21054/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:28.000 [print] {
"resourceType": "Procedure",
"id": "21054",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:31.183+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:28.000 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:28.002 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:28.002 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jQ0Jmsjxft2iPBPf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21054/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21054/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:28.002 [print] {
"resourceType": "Procedure",
"id": "21054",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:31.183+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:28.002 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:28.618 [print] {
"resourceType": "Procedure",
"id": "21054",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:31.183+02:00",
"source": "#jQ0Jmsjxft2iPBPf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:29.228 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:29.849 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:37:32.423+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:37:32.423+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:29.850 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:30.448 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:30.448 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oyySZzHiNK7nnBoy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21055/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21055/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:30.448 [print] {
"resourceType": "Procedure",
"id": "21055",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:33.640+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:30.449 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:30.450 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:30.450 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oyySZzHiNK7nnBoy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21055/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21055/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:30.450 [print] {
"resourceType": "Procedure",
"id": "21055",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:33.640+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:30.450 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:31.047 [print] {
"resourceType": "Procedure",
"id": "21055",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:33.640+02:00",
"source": "#oyySZzHiNK7nnBoy",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:31.689 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:32.300 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:37:34.880+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:37:34.880+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:32.301 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:33.156 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:33.156 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lI1fHOj3heLI7hsR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21056/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21056/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:33.156 [print] {
"resourceType": "Procedure",
"id": "21056",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:36.328+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:33.156 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:33.157 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:33.157 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lI1fHOj3heLI7hsR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21056/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21056/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:33.157 [print] {
"resourceType": "Procedure",
"id": "21056",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:36.328+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:33.157 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:33.760 [print] {
"resourceType": "Procedure",
"id": "21056",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:36.328+02:00",
"source": "#lI1fHOj3heLI7hsR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:34.396 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:35.007 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:37:37.581+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:37:37.581+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:35.009 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:35.638 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:35.638 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6DKGh0j05eG52oPJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21057/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21057/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:35.638 [print] {
"resourceType": "Procedure",
"id": "21057",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:38.816+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:35.638 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:35.640 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:35.640 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6DKGh0j05eG52oPJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21057/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21057/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:35.640 [print] {
"resourceType": "Procedure",
"id": "21057",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:38.816+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:35.640 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:36.304 [print] {
"resourceType": "Procedure",
"id": "21057",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:38.816+02:00",
"source": "#6DKGh0j05eG52oPJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:36.908 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:37.493 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:37:40.101+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:37:40.101+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:37.494 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:38.415 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:38.415 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Pb7E6hKCMaXpoHk0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21058/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21058/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:38.415 [print] {
"resourceType": "Procedure",
"id": "21058",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:41.603+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:38.415 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:38.417 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:38.417 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Pb7E6hKCMaXpoHk0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21058/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21058/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:38.417 [print] {
"resourceType": "Procedure",
"id": "21058",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:41.603+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:38.417 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:39.245 [print] {
"resourceType": "Procedure",
"id": "21058",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:41.603+02:00",
"source": "#Pb7E6hKCMaXpoHk0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:39.870 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:40.497 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:37:43.060+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:37:43.060+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:40.499 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:41.130 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:41.130 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Cn6OLVmrQp5PgHby"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21059/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21059/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:41.130 [print] {
"resourceType": "Procedure",
"id": "21059",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:44.315+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:41.130 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:41.132 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:41.132 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Cn6OLVmrQp5PgHby"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21059/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21059/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:41.132 [print] {
"resourceType": "Procedure",
"id": "21059",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:44.315+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:41.132 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:41.776 [print] {
"resourceType": "Procedure",
"id": "21059",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:44.315+02:00",
"source": "#Cn6OLVmrQp5PgHby",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:42.378 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:43.002 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:37:45.569+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:37:45.569+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:43.003 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:43.630 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:43.630 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Zk9qsVb7Z5atiNRJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21060/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21060/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:43.630 [print] {
"resourceType": "Procedure",
"id": "21060",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:46.821+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:43.630 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:43.632 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:43.632 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Zk9qsVb7Z5atiNRJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21060/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21060/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:43.632 [print] {
"resourceType": "Procedure",
"id": "21060",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:46.821+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:43.632 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:44.229 [print] {
"resourceType": "Procedure",
"id": "21060",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:46.821+02:00",
"source": "#Zk9qsVb7Z5atiNRJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:44.894 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:45.773 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:37:48.087+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:37:48.087+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:45.774 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:46.442 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:46.442 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5SCfiVPr2nlNuWv8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21061/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21061/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:46.442 [print] {
"resourceType": "Procedure",
"id": "21061",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:49.631+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:46.442 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:46.443 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:46.443 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5SCfiVPr2nlNuWv8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21061/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21061/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:46.443 [print] {
"resourceType": "Procedure",
"id": "21061",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:49.631+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:46.443 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:47.045 [print] {
"resourceType": "Procedure",
"id": "21061",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:49.631+02:00",
"source": "#5SCfiVPr2nlNuWv8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:47.656 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:48.290 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:37:50.848+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:37:50.848+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:48.292 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:48.932 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:48.932 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7zqGrUq8giG45W5L"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21062/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21062/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:48.932 [print] {
"resourceType": "Procedure",
"id": "21062",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:52.121+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:48.932 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:48.933 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:48.933 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7zqGrUq8giG45W5L"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21062/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21062/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:48.933 [print] {
"resourceType": "Procedure",
"id": "21062",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:52.121+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:48.933 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:49.541 [print] {
"resourceType": "Procedure",
"id": "21062",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:52.121+02:00",
"source": "#7zqGrUq8giG45W5L",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:50.188 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:50.789 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:37:53.373+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:37:53.373+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:50.791 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:51.414 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:51.414 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cxcSI8xNUDqZsRY8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21063/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21063/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:51.414 [print] {
"resourceType": "Procedure",
"id": "21063",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:54.598+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:51.414 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:51.416 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:51.416 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cxcSI8xNUDqZsRY8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21063/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21063/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:51.416 [print] {
"resourceType": "Procedure",
"id": "21063",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:54.598+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:51.416 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:52.016 [print] {
"resourceType": "Procedure",
"id": "21063",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:54.598+02:00",
"source": "#cxcSI8xNUDqZsRY8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:52.636 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:53.244 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:37:55.829+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:37:55.829+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:53.245 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:53.854 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:53.854 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"taD8ADnBruUoJT11"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21064/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21064/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:53.854 [print] {
"resourceType": "Procedure",
"id": "21064",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:57.049+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:53.854 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:53.855 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:53.855 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"taD8ADnBruUoJT11"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21064/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21064/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:53.855 [print] {
"resourceType": "Procedure",
"id": "21064",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:57.049+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:53.855 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:54.458 [print] {
"resourceType": "Procedure",
"id": "21064",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:57.049+02:00",
"source": "#taD8ADnBruUoJT11",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:55.069 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:55.683 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:37:58.264+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:37:58.264+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:55.685 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:56.315 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:56.315 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5nJySgj9qhmPHkZg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21065/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21065/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:56.315 [print] {
"resourceType": "Procedure",
"id": "21065",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:59.490+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:56.315 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:56.316 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:56.316 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5nJySgj9qhmPHkZg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21065/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:37:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21065/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:37:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:56.316 [print] {
"resourceType": "Procedure",
"id": "21065",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:59.490+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:56.316 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:56.919 [print] {
"resourceType": "Procedure",
"id": "21065",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:37:59.490+02:00",
"source": "#5nJySgj9qhmPHkZg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:37:57.556 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:37:58.172 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:38:00.743+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:38:00.743+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:37:58.172 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:58.992 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:58.992 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6gKZH7frcWRniYhf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21066/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:38:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21066/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:38:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:58.992 [print] {
"resourceType": "Procedure",
"id": "21066",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:02.176+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:58.992 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:37:58.994 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:37:58.994 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6gKZH7frcWRniYhf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21066/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:38:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21066/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:38:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:37:58.994 [print] {
"resourceType": "Procedure",
"id": "21066",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:02.176+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:37:58.994 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:37:59.623 [print] {
"resourceType": "Procedure",
"id": "21066",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:02.176+02:00",
"source": "#6gKZH7frcWRniYhf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:00.261 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:00.878 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:38:03.456+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:38:03.456+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:00.880 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:01.541 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:01.541 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YvFg794spwB6MbnS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21067/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:38:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21067/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:38:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:01.541 [print] {
"resourceType": "Procedure",
"id": "21067",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:04.713+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:38:01.541 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:01.542 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:01.542 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YvFg794spwB6MbnS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21067/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:38:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21067/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:38:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:01.542 [print] {
"resourceType": "Procedure",
"id": "21067",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:04.713+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:38:01.542 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:02.129 [print] {
"resourceType": "Procedure",
"id": "21067",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:04.713+02:00",
"source": "#YvFg794spwB6MbnS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:02.772 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:03.381 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:38:05.963+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:38:05.963+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:03.382 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:03.990 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:03.991 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oXNfQW0pBwjlSCKA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21068/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:38:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21068/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:38:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:03.991 [print] {
"resourceType": "Procedure",
"id": "21068",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:07.184+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:38:03.991 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:03.992 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:03.992 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oXNfQW0pBwjlSCKA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21068/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:38:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21068/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:38:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:03.992 [print] {
"resourceType": "Procedure",
"id": "21068",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:07.184+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:38:03.992 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:04.613 [print] {
"resourceType": "Procedure",
"id": "21068",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:07.184+02:00",
"source": "#oXNfQW0pBwjlSCKA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:05.303 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:06.349 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:38:08.487+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:38:08.487+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:06.350 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:06.974 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:06.974 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3iIk1gA0jfpo8Ffd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21069/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:38:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21069/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:38:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:06.974 [print] {
"resourceType": "Procedure",
"id": "21069",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:10.160+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:38:06.974 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:06.976 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:06.976 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3iIk1gA0jfpo8Ffd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21069/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:38:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21069/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:38:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:06.976 [print] {
"resourceType": "Procedure",
"id": "21069",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:10.160+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:38:06.976 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:07.584 [print] {
"resourceType": "Procedure",
"id": "21069",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:10.160+02:00",
"source": "#3iIk1gA0jfpo8Ffd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:08.196 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:09.831 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:38:11.386+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:38:11.386+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:09.832 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:10.458 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:10.458 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Szy8jus0vbVF9bQB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21070/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:38:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21070/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:38:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:10.458 [print] {
"resourceType": "Procedure",
"id": "21070",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:13.647+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:38:10.458 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:10.460 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:10.460 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Szy8jus0vbVF9bQB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21070/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:38:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21070/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:38:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:10.460 [print] {
"resourceType": "Procedure",
"id": "21070",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:13.647+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:38:10.460 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:11.081 [print] {
"resourceType": "Procedure",
"id": "21070",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:13.647+02:00",
"source": "#Szy8jus0vbVF9bQB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:13.710 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:14.332 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:38:16.904+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:38:16.904+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:14.333 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:14.953 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:14.953 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IdhvCCODjNfuYEOe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21071/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:38:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21071/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:38:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:14.953 [print] {
"resourceType": "Procedure",
"id": "21071",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:18.139+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:38:14.953 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:14.954 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:14.954 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IdhvCCODjNfuYEOe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21071/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:38:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21071/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:38:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:14.954 [print] {
"resourceType": "Procedure",
"id": "21071",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:18.139+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:38:14.955 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:15.563 [print] {
"resourceType": "Procedure",
"id": "21071",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:18.139+02:00",
"source": "#IdhvCCODjNfuYEOe",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:16.181 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:16.800 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:38:19.369+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:38:19.369+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:16.801 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:17.709 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:17.709 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LAKZPJ9BaeoaopnF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21072/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:38:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21072/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:38:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:17.709 [print] {
"resourceType": "Procedure",
"id": "21072",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:20.903+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:38:17.709 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:17.710 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:17.710 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LAKZPJ9BaeoaopnF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21072/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:38:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21072/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:38:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:17.710 [print] {
"resourceType": "Procedure",
"id": "21072",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:20.903+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:38:17.710 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:18.316 [print] {
"resourceType": "Procedure",
"id": "21072",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:20.903+02:00",
"source": "#LAKZPJ9BaeoaopnF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:18.947 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:19.547 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:38:22.143+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:38:22.143+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:19.549 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:20.194 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:20.194 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fKqMdo484r27Z75V"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21073/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:38:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21073/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:38:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:20.194 [print] {
"resourceType": "Procedure",
"id": "21073",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:23.384+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:38:20.194 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:20.195 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:20.195 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fKqMdo484r27Z75V"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21073/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:38:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21073/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:38:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:20.196 [print] {
"resourceType": "Procedure",
"id": "21073",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:23.384+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:38:20.196 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:20.801 [print] {
"resourceType": "Procedure",
"id": "21073",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:23.384+02:00",
"source": "#fKqMdo484r27Z75V",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:21.470 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:22.102 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:38:24.657+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:38:24.657+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:22.104 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:22.716 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:22.716 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gwUEoWIZe6PRCnbu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21074/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:38:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21074/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:38:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:22.716 [print] {
"resourceType": "Procedure",
"id": "21074",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:25.911+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:38:22.716 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:22.717 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:22.717 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gwUEoWIZe6PRCnbu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21074/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:38:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21074/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:38:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:22.717 [print] {
"resourceType": "Procedure",
"id": "21074",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:25.911+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:38:22.717 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:23.355 [print] {
"resourceType": "Procedure",
"id": "21074",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:25.911+02:00",
"source": "#gwUEoWIZe6PRCnbu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:23.975 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:24.595 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:38:27.171+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:38:27.171+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:38:24.597 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:25.224 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:25.224 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AbAX0niO7aUR7LfQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21075/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:38:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21075/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:38:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:25.224 [print] {
"resourceType": "Procedure",
"id": "21075",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:28.421+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:38:25.224 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:38:25.226 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"260"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:38:25.226 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AbAX0niO7aUR7LfQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21075/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:38:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21075/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:38:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:38:25.226 [print] {
"resourceType": "Procedure",
"id": "21075",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:28.421+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
> *
print COOKIES
11:38:25.226 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:38:25.855 [print] {
"resourceType": "Procedure",
"id": "21075",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:38:28.421+02:00",
"source": "#AbAX0niO7aUR7LfQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-surgery-eu-pcsp"
]
},
"language": "ES",
"status": "completed"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:38:26.480 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:38:27.091 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:38:29.672+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:38:29.672+02:00"
}
]
}